AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Any] Paranoia IP Tracker (https://forums.alliedmods.net/showthread.php?t=179059)

DarthNinja 02-25-2012 07:41

[Any] Paranoia IP Tracker
 
1 Attachment(s)
[Any] Paranoia IP Tracker
Version 1.0.1


Description:
Logs players IP addresses to two database tables.

Why?
Maybe you've had an issue with a skiddie attacking your servers and want to track their IP to a steamid. Maybe you've wanted to ban a troublemaker, but they just create new accounts.

Whatever your reason is, this plugin is intended for proactive security/logging, although you could also use it to see where your players are playing from if you were inclined.
The plugin creates and logs to two tables:
  • Paranoia_IPTracker:
    Holds the player's steamid, last used name, a timestamp of their last connect, and the player's last 10 unique IP addresses.
  • Paranoia_IPTrackerLogs:
    Stores a row for every connection with the steamid, name, IP and timestamp for that connection.
    Note: this table is only used if sm_paranoia_ip_verbose is set to 1.

Commands:
  • None

Cvars:
  • sm_paranoia_ip_version
    • Plugin Version
  • sm_paranoia_ip_verbose
    • Set to 1 and the plugin will also log to Paranoia_IPTrackerLogs.

Install Instructions:

  1. Place ParanoiaIPTracker.smx into your addons/sourcemod/plugins/ folder.
  2. Update your databases.cfg file with an entry for "paranoiaip".

Notes:
  • If the plugin loses connection to the database server, it will log to the logs/paranoia_ip.log file as a backup solution.
  • This plugin does NOT support SQLite.

Version History:
  • V1.0.0
    • Initial Release
  • V1.0.1
    • Forgot to escape names.
Total downloads as prior to last edit: 20







DarthNinja 02-25-2012 07:42

Re: [Any] Paranoia IP Tracker
 
Reserved

Groger 02-25-2012 08:47

Re: [Any] Paranoia IP Tracker
 
haha, brilliant :P

**installing**

Aggamemnon 02-26-2012 06:02

Re: [Any] Paranoia IP Tracker
 
Looks great!:avast:

Can this be put into several servers?

DarthNinja 02-26-2012 07:55

Re: [Any] Paranoia IP Tracker
 
Yep

Professor Chaos 02-27-2012 07:58

Re: [Any] Paranoia IP Tracker
 
It was installed before i finished reading the description......

ku5h 02-27-2012 20:57

Re: [Any] Paranoia IP Tracker
 
nice plugin. thx.

TnTSCS 03-02-2012 17:56

Re: [Any] Paranoia IP Tracker
 
nice :)

Will put this to use

PiwneBractwo 03-03-2012 06:54

Re: [Any] Paranoia IP Tracker
 
Nice plugin :)

You can change the date in Paranoia_IPTrackerLogs / ConnectTime ?
In this table I see date for example 1330774025.


Sorry for my english
Regards

monomizer 03-03-2012 09:55

Re: [Any] Paranoia IP Tracker
 
should look something like a database?
"paranoiaip"
{
"driver" "sqlite"
"database" "paranoiaip"
}

or

"paranoiaip"
{
"driver" "sqlite"
"host" "localhost"
"database" "paranoiaip"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}

DarthNinja 03-03-2012 11:10

Re: [Any] Paranoia IP Tracker
 
PiwneBractwo:
Change it?

monomizer:
Using SQLite isn't going to work.

PiwneBractwo 03-04-2012 07:09

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by DarthNinja (Post 1661719)
PiwneBractwo:
Change it?

I don't know how to change it. DarthNinja you can change this? Or, write how I can do it.

Sorry for my english
Regards

DarthNinja 03-04-2012 10:06

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by PiwneBractwo (Post 1662334)
I don't know how to change it. DarthNinja you can change this? Or, write how I can do it.

Sorry for my english
Regards

I don't know what you mean by "change it".
What do you want to change it to?

MaloModo 03-04-2012 10:47

Re: [Any] Paranoia IP Tracker
 
Installed....sounds sweet :)

Peace-Maker 03-04-2012 13:13

Re: [Any] Paranoia IP Tracker
 
That update query pushing a new ip into the list is nice. I didn't think of that :)

DarthNinja 03-04-2012 17:40

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by Peace-Maker (Post 1662523)
That update query pushing a new ip into the list is nice. I didn't think of that :)

Yeah, I should probably check the new IP against all the 10 stored IPs, not just the first one though.


Dr. McKay 03-05-2012 00:51

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by PiwneBractwo (Post 1661580)
Nice plugin :)

You can change the date in Paranoia_IPTrackerLogs / ConnectTime ?
In this table I see date for example 1330774025.


Sorry for my english
Regards

That's a UNIX timestamp. Convert it here -> http://www.unixtimestamp.com

Paste the number into the Timestamp box and hit Convert.

Code:

TIME STAMP: 1330774025

DATE (M/D/Y @ h:m:s): 03 / 03 / 12 @ 5:27:05am EST


TnTSCS 03-05-2012 10:22

Re: [Any] Paranoia IP Tracker
 
Unix time stamp is the number of seconds since Jan 01 1970 :)

In case anyone was wondering - like I was

togie6 04-01-2012 01:46

Re: [Any] Paranoia IP Tracker
 
I am having trouble adding the required line to configs/database.cfg to make this plugin work.
Could you please paste it here D=
Ive added a entry for paranoiaip but the plugin still fails to load

GameRover 04-07-2012 12:38

MySQL Error for "INSERT INTO..."
 
I tried "sm_paranoia_ip_verbose 1;" in this plugin and it work fine for log at "paranoia_iptrackerlogs". But this plugin cant work for "paranoia_iptracker" because this msg from my MySQL(v5.5.22):
Code:

[ParanoiaIPTracker.smx] SQL Error: Field 'IP1' doesn't have a default value
I looked at this plugin's script and see that "IP1"~"IP10" defined as "NOT NULL" in creating table...
How did you setup the database or table so get this SQL script "INSERT INTO..." work?

P.s. Sorry first for my bad English and bad SQL.



Plus:

Because my MySQL don't do "UPDATE" for "NOT NULL" and when "IP1" is "NULL" (i have no idea why can't "WHERE `IP1` != '%s'" be satisfied with "IP1 := NULL".).
So I modified part of plugin's script @[SQL_CreateTables()]:
Code:

//...
    len += Format(query[len], sizeof(query)-len, "  `Name` varchar(128) COLLATE utf8_unicode_ci NOT NULL,");
    len += Format(query[len], sizeof(query)-len, "  `LastConnected` int(12) NOT NULL,");
    len += Format(query[len], sizeof(query)-len, "  `IP1` varchar(64) COLLATE utf8_unicode_ci DEFAULT '0.0.0.0',");
    len += Format(query[len], sizeof(query)-len, "  `IP2` varchar(64) COLLATE utf8_unicode_ci DEFAULT '0.0.0.0',");
    len += Format(query[len], sizeof(query)-len, "  `IP3` varchar(64) COLLATE utf8_unicode_ci DEFAULT '0.0.0.0',");
    len += Format(query[len], sizeof(query)-len, "  `IP4` varchar(64) COLLATE utf8_unicode_ci DEFAULT '0.0.0.0',");
    len += Format(query[len], sizeof(query)-len, "  `IP5` varchar(64) COLLATE utf8_unicode_ci DEFAULT '0.0.0.0',");
    len += Format(query[len], sizeof(query)-len, "  `IP6` varchar(64) COLLATE utf8_unicode_ci DEFAULT '0.0.0.0',");
    len += Format(query[len], sizeof(query)-len, "  `IP7` varchar(64) COLLATE utf8_unicode_ci DEFAULT '0.0.0.0',");
    len += Format(query[len], sizeof(query)-len, "  `IP8` varchar(64) COLLATE utf8_unicode_ci DEFAULT '0.0.0.0',");
    len += Format(query[len], sizeof(query)-len, "  `IP9` varchar(64) COLLATE utf8_unicode_ci DEFAULT '0.0.0.0',");
    len += Format(query[len], sizeof(query)-len, "  `IP10` varchar(64) COLLATE utf8_unicode_ci DEFAULT '0.0.0.0',");
    len += Format(query[len], sizeof(query)-len, "  PRIMARY KEY (`id`),");
    len += Format(query[len], sizeof(query)-len, "  UNIQUE KEY `SteamID` (`SteamID`)");
//...

And now this plugin work fine. thanks for DarthNinja's work.

DoPe^ 04-29-2012 20:14

Re: [Any] Paranoia IP Tracker
 
nvm :)

pvkii 05-08-2012 04:25

Re: [Any] Paranoia IP Tracker
 
I am having the same problem as others before, I can`t get the databases.cfg entry right, can you tell me how it should look like? please?
what to use instead of sqlite?

Jim E. Rustler 07-19-2012 19:45

Re: [Any] Paranoia IP Tracker
 
Warning: Using this plugin will keep you from dropping the database later on if you choose to no longer use it. This is because it writes an UTF-8 Unicode English text file named "ips" in /var/lib/mysql/paranoiaip.

Code:


ERROR 1010 (HY000): Error dropping database (can't rmdir './paranoiaip/', errno: 17)

What I had to do to successfully drop the database was login via root and manually remove the "ips" file from /var/lib/mysql/paranoiaip then I was able to drop the database at the mysql command line.

DarthNinja 07-19-2012 23:11

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by Jim E. Rustler (Post 1754070)
Warning: Using this plugin will keep you from dropping the database later on if you choose to no longer use it. This is because it writes an UTF-8 Unicode English text file named "ips" in /var/lib/mysql/paranoiaip.

Code:


ERROR 1010 (HY000): Error dropping database (can't rmdir './paranoiaip/', errno: 17)

What I had to do to successfully drop the database was login via root and manually remove the "ips" file from /var/lib/mysql/paranoiaip then I was able to drop the database at the mysql command line.

Your database server wrote that file, not this plugin.

Hunter S. Thompson 07-20-2012 00:54

Re: [Any] Paranoia IP Tracker
 
I fail to see the idea behind this plugin.

DDoS (Distributed denial of service) attacks come from more than 1 IP, and 99% of the time, the attacker isn't part of the botnet. Also, this would only ban him from the server, making him more incline to attack your server.

Now, if this was used in conjunction with IPTables (Linux), then it would be good.

11530 07-20-2012 08:48

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by Hunter S. Thompson (Post 1754192)
I fail to see the idea behind this plugin.

DDoS (Distributed denial of service) attacks come from more than 1 IP, and 99% of the time, the attacker isn't part of the botnet. Also, this would only ban him from the server, making him more incline to attack your server.

Now, if this was used in conjunction with IPTables (Linux), then it would be good.

1) This is just an IP Tracker and doesn't do anything it doesn't say on the box.

2) Yes, DDoS's would come from multiple IPs, but we're talking about a single IP here, e.g. DoS.

Hunter S. Thompson 07-20-2012 10:55

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by 11530 (Post 1754373)
1) This is just an IP Tracker and doesn't do anything it doesn't say on the box.

2) Yes, DDoS's would come from multiple IPs, but we're talking about a single IP here, e.g. DoS.

A DoS wouldn't take down a server, the only effective DoS is slowloris, and that's for websites running apache; sure, you can count some lag exploits as a DoS, but if you can block AS2/ASA command and other various lag exploits, then there's no need to track IPs.

Dr. McKay 07-20-2012 10:59

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by Hunter S. Thompson (Post 1754447)
A DoS wouldn't take down a server, the only effective DoS is slowloris, and that's for websites running apache; sure, you can count some lag exploits as a DoS, but if you can block AS2/ASA command and other various lag exploits, then there's no need to track IPs.

Excuse me? I'm sure there are plenty of vulnerabilities in SRCDS that people can take advantage of to bring down the server. Remember listdeaths?

Hunter S. Thompson 07-20-2012 12:55

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by Dr. McKay (Post 1754449)
Excuse me? I'm sure there are plenty of vulnerabilities in SRCDS that people can take advantage of to bring down the server. Remember listdeaths?

Quote:

Originally Posted by Hunter S. Thompson
sure, you can count some lag exploits as a DoS, but if you can block AS2/ASA command and other various lag exploits, then there's no need to track IPs.

I personally don't count lag exploits as "DoS's" or "DDoS's", considering they're not. They're exploits, and there's plenty of plugins to stop it, and logging IPaddresses won't help it. Anything can be used for evil, hell, I can write a DoS script in SourcePAWN.

My point to all of this is, is that DoS's won't ever stop, nor will they take down a server, and this plugin, although good, won't stop it. Lag exploits/exploits in general can, and will, however.

Dr. McKay 07-20-2012 14:36

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by Hunter S. Thompson (Post 1754513)
I personally don't count lag exploits as "DoS's" or "DDoS's", considering they're not. They're exploits, and there's plenty of plugins to stop it, and logging IPaddresses won't help it. Anything can be used for evil, hell, I can write a DoS script in SourcePAWN.

My point to all of this is, is that DoS's won't ever stop, nor will they take down a server, and this plugin, although good, won't stop it. Lag exploits/exploits in general can, and will, however.

The listdeaths exploit did in fact crash the server.

Lag exploits are denying service, so they're DoS attacks.

Sure, you can write a DoS script in SourcePawn. Good luck uploading that to a server you want to attack though.

This plugin exists to log IP addresses. Nothing more, nothing less. If you don't think it's useful, don't use it.

DarthNinja 07-20-2012 22:54

Re: [Any] Paranoia IP Tracker
 
The intent of this plugin is to store a list of IP addresses associated with a SteamID.

This is useful if your webserver is attacked by a single client (I have had DoS attacks, and people trying to brute force admin logins for my forums), or if your srcds installs are attacked via various methods.

It is also useful for seeing if more then one player plays from the same IP (ban evading), or if one account connects from a lot of IPs (dynamic IP address). This is especially useful for trade servers where someone might connect several accounts in order to run a scam.

If you don't think collecting data that you might need at some point is a good idea, then I really have nothing else to say to you.

Hunter S. Thompson 07-21-2012 02:10

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by Dr. McKay (Post 1754569)
The listdeaths exploit did in fact crash the server.

Lag exploits are denying service, so they're DoS attacks.

Sure, you can write a DoS script in SourcePawn. Good luck uploading that to a server you want to attack though.

This plugin exists to log IP addresses. Nothing more, nothing less. If you don't think it's useful, don't use it.

The Listdeaths exploit was patched a long, long time ago. And DoS attacks such as ASA/AS2 spamming can be easily prevented by writing your own plugin for it.

And why would I need to upload it to a server I want to attack? If I had access to the server via FTP then I can just drop a rootkit on it, or furthermore root the entire box. What I was referring to, is using the Sockets extension in conjunction with a timer set to repeat to repeatedly open and close a connection to the server. This is in fact the definition of a DoS attack, is it not? Hell, I can take it a step further and have it send an incomplete header to an server running an apache or otherwise affected service effectively utilizing the SlowLoris DoS attack method.

SourcePawn can be used for evil, just as any other language.

Quote:

Originally Posted by DarthNinja
The intent of this plugin is to store a list of IP addresses associated with a SteamID.

This is useful if your webserver is attacked by a single client (I have had DoS attacks, and people trying to brute force admin logins for my forums), or if your srcds installs are attacked via various methods.

It is also useful for seeing if more then one player plays from the same IP (ban evading), or if one account connects from a lot of IPs (dynamic IP address). This is especially useful for trade servers where someone might connect several accounts in order to run a scam.

If you don't think collecting data that you might need at some point is a good idea, then I really have nothing else to say to you.

In my opinion, this isn't THAT useful. While you've stated some good points, and I myself may incorporate this plugin when and if I get a TF2 server, it's nulled by the fact that you can install 3rd party software that does this job, and much, much more. Take IPTables for an example; used by someone who knows how to use it, it's more effective than any firewall, and can mitigate attacks quite effectively.

If you're having trouble with downtime on your site, then I suggest CloudFlare; and with the bruteforcing, you can easily stop this by applying a maximum retry value.

Dr. McKay 07-21-2012 03:21

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by Hunter S. Thompson (Post 1754922)
The Listdeaths exploit was patched a long, long time ago.

Actually, less than a month ago. The first time, it was just "hidden".

I wouldn't personally use this plugin. However, there are those that will, and they are who this is for. You may think there is a better way, but people have their preferences.

Smarmy 07-21-2012 04:04

Re: [Any] Paranoia IP Tracker
 
What does it matter, I think he listed the DoS thing as a single use case. You use it for what you find it useful for, jeez.

If you don't see a use for it, don't download it.

step 08-31-2012 03:38

Re: [Any] Paranoia IP Tracker
 
Excellent plugin. Thanks, DarthNinja.

DarthNinja 08-31-2012 11:12

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by step (Post 1787588)
Excellent plugin. Thanks, DarthNinja.

:3

s.m.a.c head 07-11-2013 02:48

Re: [Any] Paranoia IP Tracker
 
from what i read this has nothing to do with dos or DDoS attacks or any form of attacks it merely saves IPs along with steam ids
SO
what should my database.cfg look like

i did it like this is it correct ?
Quote:

"paranoiaip"
{
"driver" "sqlite"
"database" "paranoiaip"
}




OK i used this in database.cfg and it worked

Quote:

"paranoiaip"
{
"driver" "sqlite"
"host" "localhost"
"database" "paranoiaip"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}
ok its loaded and i presume working but where does it store the IP list >????

I look and see paranoiaip.sq3 but it has nothing in it


"pass" "do i need my password for my server here ?"

///////////////////////////////EDIT/////////////////////////////////////////////////////////
i get this in console if it helps ?


Quote:

L 07/11/2013 - 07:25:07: [ParanoiaIPTracker.smx] [Paranoia IP Tracker v1.0.1] Online and connected to database!
[Paranoia IP Tracker v1.0.1] Online and connected to database!
L 07/11/2013 - 07:25:08: [ParanoiaIPTracker.smx] SQL Error: near "AUTO_INCREMENT": syntax error
L 07/11/2013 - 07:25:08: [ParanoiaIPTracker.smx] SQL Error: near "AUTO_INCREMENT": syntax error
L 07/11/2013 - 07:25:08: [ParanoiaIPTracker.smx] SQL Error: near "SET": syntax error
Connection to Steam servers successful.
VAC secure mode is activated.

Dr. McKay 07-11-2013 08:47

[Any] Paranoia IP Tracker
 
It doesn't support SQLite.

s.m.a.c head 07-11-2013 15:43

Re: [Any] Paranoia IP Tracker
 
Quote:

Originally Posted by Dr. McKay (Post 1988482)
It doesn't support SQLite.

ok thanks so what should i write in database.cfg ?

Quote:

"paranoiaip"
{
"driver" "?????"
"host" "??????"
"database" "??????"
"user" "?????"
"pass" "?????"
//"timeout" "0"
//"port" "0"
}
i guess this ?
Quote:

"driver" "mysql"
"host" "localhost"
"database" "paranoiaip"
doesnt work either I give up

jpwanabe 07-12-2013 23:13

Re: [Any] Paranoia IP Tracker
 
Any change of a web page to interface with this being added?


All times are GMT -4. The time now is 06:42.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.