ART OF EXPLOIT WRITING                         Ashfaq Ansari   Security Researcher & Penetration Tester                 Fo...
Buffer Overflow• Writing more data into a buffer than the  allocated size.• Two types:   – Stack Overflow    corrupt the e...
Process Memory Organization                  • Fixed by the program  Text            • Read-only          Text  Data      ...
The Stack - We Must Know Him       • Stack is LIFO – Last In FirstLIFO     Out       • PUSH & POP operation               ...
x86 General Purpose Register
Fuzzing
Overview     • Black Box software testing technique,       which helps in finding implementation 1     bugs using malforme...
The Stack - OverflowBuffer   • Overwritten by A’s &   AAAA           B’s                    AAAA1&2                       ...
Bad Charactersx00          x0a        x0d       NULL          n          r
DEMO
Work Hard Toward Mastery                                                   Achieve                                        ...
Art of Exploit Writing
Upcoming SlideShare
Loading in...5
×

Art of Exploit Writing

2,611

Published on

null Bangalore Chapter, January 2013 Meet

1 Comment
2 Likes
Statistics
Notes
  • oh! this is such a great,,,.,.,.,,.trickzzzzzzzzzzzzzzzzzzzzzzzzzzz...
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
2,611
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
36
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

Art of Exploit Writing

  1. 1. ART OF EXPLOIT WRITING Ashfaq Ansari Security Researcher & Penetration Tester Founder Of: HackSys Team http://hacksys.vfreaks.com/ null Meet @Bangalore – 19th Jan 2013
  2. 2. Buffer Overflow• Writing more data into a buffer than the allocated size.• Two types: – Stack Overflow corrupt the execution stack by writing past the end of an array (aka. smashing the stack/ stack overflow) – Heap Overflow corrupt the heap
  3. 3. Process Memory Organization • Fixed by the program Text • Read-only Text Data • Initialized & Uninitialized Data • Static variables are stored here Heap Data • Local variables for functions • Return address and local stack pointer Stack Stack
  4. 4. The Stack - We Must Know Him • Stack is LIFO – Last In FirstLIFO Out • PUSH & POP operation Buffer 2 • Dynamically allocate local Buffer 1Used variables used in functions • Pass parameters to functions, etc. SFP RET • Stack Pointer (SP) points aInfo to the top of the stack • Contains return address and local stack pointer b c
  5. 5. x86 General Purpose Register
  6. 6. Fuzzing
  7. 7. Overview • Black Box software testing technique, which helps in finding implementation 1 bugs using malformed /semi-malformed data injection in an automated fashion 2 • Lazy mans tool
  8. 8. The Stack - OverflowBuffer • Overwritten by A’s & AAAA B’s AAAA1&2 AAAA BBBB SFP • Overwritten by C’s BBBB CCCC DDDD AAAA • Return Overwritten RET by D’s AAAA AAAA
  9. 9. Bad Charactersx00 x0a x0d NULL n r
  10. 10. DEMO
  11. 11. Work Hard Toward Mastery Achieve MasteryExploits Worked On Get Experienced Get Familiar Time Spent
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×