Hi! I was searching old posts for ways of 'securing' an SQL server, only way I came up with was: osql -U sa -P "admin" -Q "sp_password admin,PASSWORD, sa"
but it didnt quite fit my needs, any other ideas?...
ZoRRo_
Dec 29 2003, 01:25 PM
you can rename the ftp.exe , cmd.exe and the tftp.exe .. it's another waay t "secure" your sql server..
mrBob
Dec 29 2003, 03:22 PM
QUOTE (ZoRRo_ @ Dec 29 2003, 01:25 PM)
you can rename the ftp.exe , cmd.exe and the tftp.exe .. it's another waay t "secure" your sql server..
that has NO effect... the files come back after 2 secs and be a bit more specific about what you want th0m...
GhostCow
Dec 29 2003, 04:01 PM
the answer is simple: open up the system dir (c:\winnt\system32 on nt or 2k), display as details, and then sort by size. then, find ftp and tftp and take different files that are exactly the same size as them,copy and rename them to tftp.exe and ftp.exe accordingly, and then put the real ones on fake ones (similar to breast implants ) and there you have it. 2 completely disfuncional programs there to f*ck someone's day up.
daTh0r
Dec 29 2003, 04:26 PM
net stop mssqlserver /yes net stop microsoftsqlserver /yes
C:\Microsoft SQL Server\Binn xpsql70.dll / xplog70.dll switch the dll's
net start mssqlserver /yes net start microsoftsqlserver /yes
the admin can use his server but you cant use the remote commands
Thom
Dec 29 2003, 04:49 PM
I know there is one way which will make the "formats" (in sqlexec.exe) unusable... thats more specific anything neet
mrBob
Dec 30 2003, 05:14 PM
QUOTE (GhostCow @ Dec 29 2003, 04:01 PM)
the answer is simple: open up the system dir (c:\winnt\system32 on nt or 2k), display as details, and then sort by size. then, find ftp and tftp and take different files that are exactly the same size as them,copy and rename them to tftp.exe and ftp.exe accordingly, and then put the real ones on fake ones (similar to breast implants ) and there you have it. 2 completely disfuncional programs there to f*ck someone's day up.
no effect either it'll have another output when windows checks the file orso i dunno but it doesn't work :-x
northernsky
Dec 30 2003, 08:19 PM
MrBob, actually, you are incorrect. One thing I've had happen to me is that I try running tftp/ftp and I get nothing. The files are there, but they are different. It's true that that method does work, but in my opinion, it's best just to change the sql password. If you oversercure if the sysop finds your stuff, you're screwed because you can't rehack into the box.
headbanger
Dec 31 2003, 08:14 PM
i agree with northensky, it does work.. ive seen it happen before..
Blast3rPL
Jan 1 2004, 11:46 AM
daTh0r - GOOD WAY !!. Ain't know that !.
When I secure SQL i'm doing :
1. Delete telnet.exe, tftp.exe, ftp.exe 2. Disabling net bios 3. Disabling access to cmd.exe by net > "cacls cmd.exe /E /R Builtin\Users" & "cacls cmd.exe /E /R Everyone". 4. Hiding my stro dir "cacls C:\path\* /T /E /P Administrator:N" & attrib +h +s C:\path\*.*
Devil
Jan 1 2004, 12:44 PM
whats the point of deleting ftp.exe??that means if it goes down then nobody ever can restart it or??that aint no good....changing the password is even better then deleting ftp.exe if u ask me!!
skorpio
Jan 1 2004, 10:50 PM
Blast3rPL
Can you explain to me to what serves this line:
4. Hiding my stro dir "cacls C:\path\* /T /E /P Administrator:N" & attrib +h +s C:\path\*.*
to what they serve the commandos evidence ???
Thanks for the availability
bye
Thom
Jan 1 2004, 11:34 PM
deleteing/replacing tftp.exe/ftp.exe or similar wont work, atleast not on all OS's - I have tested it multiple times, without luck.
FiNaLBeTa
Jan 2 2004, 01:01 PM
QUOTE (Thom @ Jan 1 2004, 11:34 PM)
deleteing/replacing tftp.exe/ftp.exe or similar wont work, atleast not on all OS's - I have tested it multiple times, without luck.
Indeed, I think i remember that windows just makes them when it needs em. my suggestion... firewall, ore use the paswordchange, and change the passes everytime windows logon.
aTahualPa
Jan 2 2004, 01:27 PM
QUOTE (Blast3rPL @ Jan 1 2004, 11:46 AM)
daTh0r - GOOD WAY !!. Ain't know that !.
When I secure SQL i'm doing :
1. Delete telnet.exe, tftp.exe, ftp.exe 2. Disabling net bios 3. Disabling access to cmd.exe by net > "cacls cmd.exe /E /R Builtin\Users" & "cacls cmd.exe /E /R Everyone". 4. Hiding my stro dir "cacls C:\path\* /T /E /P Administrator:N" & attrib +h +s C:\path\*.*
1. Delete telnet.exe, tftp.exe, ftp.exe ???
How? that don't works...
aTa
The Storm
Jan 2 2004, 03:47 PM
why don't you only change the password with sqlexec? it's the most simple way to secure and the best.
GhostCow
Jan 2 2004, 06:46 PM
yea the most stupid way to loose the box aswell... once the admin finds out someone messed with his pass he will format or some shit... is there any way to limit remote access to the account?
boshcash
Jan 2 2004, 07:04 PM
if u have read about the windows file protection u wouldnt have said the file cant be deleted ..
GhostCow
Jan 9 2004, 01:11 PM
then is the file deleteable?
The Storm
Jan 9 2004, 02:25 PM
i dont think the admin cares about the password if its sa/NULL or sth. like this. Last time i found a bat on a sql server that denies the access to ftp.exe and tftp.exe for all users does somebody knows this methode?
dmg
Jan 9 2004, 04:23 PM
QUOTE (The Storm @ Jan 9 2004, 02:25 PM)
i dont think the admin cares about the password if its sa/NULL or sth. like this. Last time i found a bat on a sql server that denies the access to ftp.exe and tftp.exe for all users does somebody knows this methode?
well when users used this command now, it's seen protocole prob in the way to use and don't rehack my job
bboybojo
Jan 9 2004, 08:44 PM
people often use the renaming/deleting of the uploading methods. it is pretty weak though, if people want in they can crack your servu pass. is the sp_dropextendedproc "xp_cmdshell" any good? i usually use change password. but i am gonna try this dll switch method, i have seen it done.
harptom
Jan 9 2004, 09:11 PM
hey, just wondering if someone could point me in the right direction of SQL rooting (root access admin) any recent or old posts or help would be grateful...
The Storm
Jan 9 2004, 09:36 PM
switching the dll`s is a good method but it isn`t 100% secure i know some people that can rechange the dll`s with database commands one guy told me it works again. But switching the dll`s is very secure because most of the sql hackers aren`t able to rechange!
SkullSplitter
Jan 9 2004, 10:11 PM
hi
net stop sqlservice (or so)
hex edit the dll´s in the second reply ...
search for xpcmd_shell and replace one char ... like this xpcmd_zhell
you can connect but you can doo nothing
SkullSplitter
The Storm
Jan 10 2004, 03:12 PM
stoping the sqlservice is a bad idea because the admin will find out that the SQL server isn`t running and then he will kill your serv-u etc. an secure his system
limbox
Jan 19 2004, 10:52 AM
well, you can restart it
GhostCow
Jan 23 2004, 11:48 AM
how to restart it?
FiNaLBeTa
Jan 23 2004, 12:30 PM
QUOTE (GhostCow @ Jan 2 2004, 06:46 PM)
yea the most stupid way to loose the box aswell... once the admin finds out someone messed with his pass he will format or some shit... is there any way to limit remote access to the account?
ofcourse thats not trough. dummest thing i ever heared.
You would format the pc if the password was wrong? You got way to much free time then.
Double-=V=-
Jan 23 2004, 01:18 PM
QUOTE (FiNaLBeTa @ Jan 23 2004, 12:30 PM)
QUOTE (GhostCow @ Jan 2 2004, 06:46 PM)
yea the most stupid way to loose the box aswell... once the admin finds out someone messed with his pass he will format or some shit... is there any way to limit remote access to the account?
ofcourse thats not trough. dummest thing i ever heared.
You would format the pc if the password was wrong? You got way to much free time then.
No but i would kill all the backdoors and shit
GhostCow
Jan 23 2004, 05:22 PM
i made a mistake, i take what i said back. i think that the sysop would just change the pass back... but limiting remote access is still a good idea in my opinion... maybe hex editing the dll's is a good idea...
mofo
Feb 1 2004, 05:03 AM
Thats not how you secure a SQL server, you gotta delete the xp cmdshell so noone can login to the sql server and issue commands. Use SQLexec on this
no its not I have cmd's that repair the xp_cmdshell again
so that wont work
- just change pass. - built a nice backdoor. - secure the path. - and some more shit. :)
mofo
Feb 4 2004, 05:07 AM
nothing can repair a cmdshell when its deleted! only local host can. How can you issue commands to repair the SQL server when u cant issue commands because it has no cmdshell?
HAnzsz
Feb 4 2004, 09:04 AM
mate there are more ways that lead to rome.
eploit the sql box on an other way and restore the dll
people who say "never" have their eyes shut most of the time.
The Storm
Feb 4 2004, 09:12 AM
how to exploit on another way?pls tell us your way. Would be gr8.
HAnzsz
Feb 4 2004, 09:21 AM
find some other way to exploit the b0x and get ro0t axx
replace the right dll again.
- there ya go.
but if you're in the b0x with an other way.. I dont think you need the sql server any more
ghehehe
but for this to work.. you need knowledge of newest exploits .. which most "scene-h4x0rs" dont have
mofo
Feb 4 2004, 08:43 PM
QUOTE
find some other way to exploit the b0x and get ro0t axx
Whats the point if your already in, you can replace a dll that doesnt exist! please think about what u wite before you type, and if you still think u can get into a secure sql server reply, i will let you try to get into one i rooted!
BrAinZ
Apr 3 2004, 04:01 PM
I've got an issue where I have (definitely) changed the SA password, but for some reason, it seems to keep changing back to ""
Anyone got any ideas why that would be??
jockel
Apr 3 2004, 04:50 PM
QUOTE (QuantumTopology @ Feb 2 2004, 05:38 AM)
QUOTE (mofo @ Feb 1 2004, 05:03 AM)
Thats not how you secure a SQL server, you gotta delete the xp cmdshell so noone can login to the sql server and issue commands. Use SQLexec on this
I had changed the password from default to something quite lengthy, but looks like someone has still got in, killed my servu server and started their own
Assuming they didn't crack my password (since it was quite long and not at all easy to guess).
I have regained access to the drive, what else should I look for to stop them hacking it again?
cougar
Apr 4 2004, 11:15 PM
You can start searching the drive (s) for backdoors. Propebly you hacked their server when you think they didn't guess your password (and delete all the files, best thing to do this is search the servu and take a look at the date it was installed, now arrange all directories @ date, and you will find some files/dir's made the same day. Check these and delete them. Also scan the server for all open ports (incase there are more backdoors etc). Install a good backdoor yourselve aswell. And to be sure change the password again in something very different.
good luck
BrAinZ
Apr 4 2004, 11:38 PM
QUOTE (cougar @ Apr 4 2004, 11:15 PM)
Install a good backdoor yourselve aswell.
What would you recommend ?
cougar
Apr 5 2004, 05:36 AM
take a look at the thread "best backdoor". I've posted a ftp link in there with 2 of my best backdoors in it. Good luck with it
BrAinZ
Apr 5 2004, 07:44 AM
Thanks.. I'll check it out!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.