Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic Proxy Detection #17069

Merged
merged 5 commits into from
Jun 18, 2016
Merged

Automatic Proxy Detection #17069

merged 5 commits into from
Jun 18, 2016

Conversation

MrStonedOne
Copy link
Member

@MrStonedOne MrStonedOne commented Apr 23, 2016

Notifies admins when connections come from known proxies and likely proxies by checking for known spammer ips (as proxies are used to spam emails/forums) using GetIpIntel.net

GetIpIntel.net returns a real number(ie: float), between 0.000 and 1.000, of their likely hood to be a proxy/spammer/infected host.

Todo:

  • Local cache so small singleton servers can skip the mysql part.
  • Test the core code.
  • Test the mysql cache part.
  • Test merge

@PKPenguin321
Copy link
Contributor

RIP NikNak

@Niknakflak
Copy link
Contributor

Didn't I already have a talk with shadowlight about the questionable reliability of Ipintel. I tested it a fair amount of times and it doesn't flag obvious ones in certain cases and in other cases it just error'd when presented with a virtual hosting IP.

I rate it 4/10 for usefulness and correctness.
I can't resign until it's less shit.

@optimumtact
Copy link
Member

optimumtact commented Apr 24, 2016

Can you make a note that this isn't perfect and should only be used as a detection guide as well, not as the sole evidence of a ban.

@Core0verload
Copy link
Contributor

Core0verload commented Apr 24, 2016

This will MURDER any player connecting from a dynamic IP or from behind heavy NAT, no matter do they use proxies or not. These "spam IP lists" are really fucking unreliable - one infected PC gets all the dynamic subnet flagged, same with NATed IPs.

log_admin("Failed Login: [key] [computer_id] [address] - IP intel rated [res.intel*100]% likely to be a bad ip.")
message_admins("<span class='adminnotice'>Failed Login: [key] [computer_id] [address] - IP intel rated [res.intel*100]% likely to be a bad ip.</span>")

. = list("reason"="IP_INTEL", "desc"="\nYour IP [address] was rated [res.intel*100]% likely to be a bad IP (spammer/proxy). The highest allowed to connect is [config.ipintel_rating_max*100]%.\nThis rating was retrieved [res.cacheminutesago] minutes ago on [res.cachedate] and refreshes in [(config.ipintel_save_bad*60)-res.cacheminutesago] minutes.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm really not sure about this actually denying people.

Maybe start with just logging results and see what kind of positive/negative detection rates we get.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG, did you fucking not see the OP, mainly the final checkmark.

Like holy shit if you aren't gonna read, don't fucking comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's okay to be upset

@PKPenguin321
Copy link
Contributor

if what oranges says is true (and im inclined to believe him) then i'm not sure how much i want this
do we really need more false positives and 40 gorillion more bad bans

@Alek2ander
Copy link
Contributor

What's the point of checking everyone? Only brand new ckeys are worth checking.

@MrStonedOne
Copy link
Member Author

MrStonedOne commented Apr 24, 2016

This system is in use by other people, goon, and another server. Just fucking fine.

Also, "These spam ip lists" Is rather generic.

Everybody is kinda lumping this in with every other bad ip list service, without any info on this.

Stop talking out of your ass.

As for why i check everyone, it's because I actually read the FAQ of the server, mainly the part about how it passively does port scan and automatic proxy attempts to the requested ip after reporting back the score, and for this reasons, values shouldn't be cached or trusted for too long as they might change.

@Dorsisdwarf Dorsisdwarf added Feature Exposes new bugs in interesting ways Administration As generous gods, we have deigned to throw the jannies a bone Work In Progress labels Apr 25, 2016
@imtakingabreakdontatme
Copy link
Contributor

@MrStonedOne

Do you plan on finishing this?

@imtakingabreakdontatme
Copy link
Contributor

I'm cleaning the PR list of all the "work in progress" stuff, I will reopen this upon request


/datum/subsystem/ipintel/Initialize(timeofday, zlevel)
enabled = 1
. = ..()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this subsystem is basically my OOP solution to the original hacky way i checked if the world had just started to avoid checking round start reconnects.

It has its failures, as it means there is a small window after world start where somebody could be a fresh connection, but never get checked, but at least its not more snowflake added to world/New()

var/datum/ipintel/cachedintel = SSipintel.cache[ip]
if (cachedintel && cachedintel.is_valid())
cachedintel.cache = TRUE
return cachedintel
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: make this refresh cached minutes ago.

@Iamgoofball
Copy link
Contributor

@ninjacha that doesnt stop cids and stickybans

@optimumtact
Copy link
Member

Will niknak ever truly be put out of a job?

Tune in next month to find out

@optimumtact
Copy link
Member

stale?

@MrStonedOne
Copy link
Member Author

It's pending the MC change since the MC change has a freeze attached to it so i'm spending all my coding time on that.

@optimumtact
Copy link
Member

Unfrozen

@optimumtact
Copy link
Member

reopen when you're ready to continue work on it

@MrStonedOne
Copy link
Member Author

Literally working on it right now.

@optimumtact optimumtact reopened this Jun 17, 2016
@optimumtact optimumtact changed the title PUTS NIKNAK OUT OF A JOB! (Automatic Proxy Detection) < NikNak> still pings me Jun 17, 2016
@optimumtact optimumtact reopened this Jun 17, 2016
@optimumtact optimumtact changed the title < NikNak> still pings me Automatic Proxy Detection Jun 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Administration As generous gods, we have deigned to throw the jannies a bone Feature Exposes new bugs in interesting ways
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants