Skip to content

Security

User input must be sanitized!

Weird machines

Unrelated for now but there is an Android's vulnerabilities CVE-2017-13156 where the system parses an APK or a DEX allowing to bypass signature.

Pentesting

There are several phases

  1. recon
  2. scan
  3. gain access
  4. maintain access
  5. cover tracks

  6. https://github.com/coreb1t/awesome-pentest-cheat-sheets

  7. https://github.com/nixawk/pentest-wiki
  8. Kali Linux Revelead PDF
  9. OWASP-Testing-Checklist

Bruteforce

In some cases it's important to make the space containing certain variables big enough to not be guessed in human time.

The most used tool is john the ripper: on a Linux system is possible to edit the src/Makefile and compile it with

$ make -C src  -f Makefile linux-x86-64-native

One usage is toto generate a mangled list of word starting from a pristine one with the following command:

$ ./run/john --wordlist=wordlist.txt --stdout --rules > expanded-word-list.txt

With no options, john will start in "single" mode first, then move on to "wordlist" mode, and finally to "incremental" mode.

$ john --incremental=Digits --stdout
1952
12345
123456
0065663
  • http://www.lanmaster53.com/2011/02/creating-complex-password-lists-with-john-the-ripper/
  • http://backreference.org/2009/10/26/password-recovery-with-john-the-ripper/

Obviously you need a good wordlist!

Privilege escalation

Custom code execution

See also shellcode.

Format String

Remember that using a too big string to exploit this vulnerability can overwrite sensible stuff, use a string as little as possible.

XPath injection

Serialization

Side channel

You can check the vulnerability of your processor from /sys/devices/system/cpu/vulnerabilities/.

Type juggling

This is possible in language that casts automatically different types when operators are used, particularly when are present more than one equal operator (== and ===).

In PHP this is more dangerous when a conversion from JSON is done.

Advanced protection mechanism bypass

Cloud

Hardware

Tools

  • https://code.google.com/p/skipfish/
  • Damn Vulnerable Web App site
  • security headers: check headers of your site
  • DNSteal: stealthily extract files from a victim machine through DNS requests
  • pwntools CTF framework and exploit development library

Fuzzing

Phishing

DNS Rebinding

  • https://lock.cmpxchg8b.com/rebinder.html
  • https://bugs.chromium.org/p/project-zero/issues/detail?id=1471&desc=2