Skip to content

BO Attacks

lethanhtung01011980 edited this page Jan 9, 2020 · 24 revisions

Goals

What to look for

  • Source code with array[xx]

To compile without stack protection

  • gcc -o jail jail.c -m32 -z execstack
  • service jail stop
  • cp jail /usr/local/bin/jail
  • service jail start

To debug for Linux executable

In Kali, to use the below mode in GDB to make the process debug the forked process (optionally). "jail" is the executable to run.

To find JMP ESP:

  • find /b <from addr>, <to addr>, 0xff, 0xe4

Socket reuse (Optional)

In case the firewall blocks outgoing connection

Exploit payload framework

To write payload program fast and return shell to the same socket.

Pattern

  • /usr/share/metasploit-framework/tools/exploit/pattern_create.rb -l 50
  • EIP Address is at 0x62413961 /usr/share/metasploit-framework/tools/exploit/pattern_offset.rb -l 50 -q 0x62413961

Sidebar

0. COMMON exploits

1. Scan Info

1.2 Passive Gathering

1.3 Active Gathering

2. Pre-attack

2.2 File transfer

3. Get Reverse Shell

4. Exploits

4.2 Windows Exploits

4.3 Linux Exploits

4.4 Password crack

4.5 Buffer Overflow

4.6 Web attacks

6. Escalate Privilege

6.1 Escalate in Windows

6.2 Escalate in Linux

7. Access and further attacks

8. Port redirection and Tunnelling

9. Metasploit

10. Kali

11. Thirdparty scripts

Clone this wiki locally