Downloads
Download
1 / 14

Downloads - PowerPoint PPT Presentation


  • 111 Views
  • Uploaded on

Downloads. rpisec.org/2013/09-13-2013/exploitation.zip For the lazy – rpisec.org/2013/ Windows & Linux Binaries! … macs?. RPISEC. Intro to Memory Corruption Fall 2013. Memory Corruption .

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Downloads' - evania


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Downloads
Downloads

  • rpisec.org/2013/09-13-2013/exploitation.zip

  • For the lazy – rpisec.org/2013/

  • Windows & Linux Binaries!

  • … macs?

Intro to Memory Corruption


Rpisec

RPISEC

Intro to Memory Corruption

Fall 2013

Intro to Memory Corruption


Memory corruption
Memory Corruption

  • The simplest definition – To change data the program uses in ways that were not intended by the programmer

  • So what does this actually mean? And what can we do with it?

  • Let’s take a look at exercise one

Intro to Memory Corruption


Exploitation one

/exploitation/one/

hands on activity time!

Intro to Memory Corruption


Uhm what even just happened
Uhm… what even just happened?

  • You just overflowed your first buffer! But in a controlled manner

  • A more reckless overflow would probably result in the program segfaulting

  • segfault: An error reading/writing to memory

Intro to Memory Corruption


The technical explanation
The technical explanation

  • The stack is how a program maintains variables and their data during execution

  • This is main()’s stack -------->

  • Omgwut have we done

  • Is_zero == ‘U’ == 85

Intro to Memory Corruption


Exploitation two

/exploitation/two/

pretty similar to /one/

Intro to Memory Corruption


Now let s take it a bit further
Now let’s take it a bit further…

  • What if we overwrote the return address that’s stored further down the stack?

  • The return address tells the program where to go after a completing a function call

  • In this case, we’d segfault… but what if we set it to something more meaningful than AAAA?

Intro to Memory Corruption


Exploitation easy

/exploitation/easy/

let’s try something crazier

Intro to Memory Corruption


If your program simply segfaulted consider yourself lucky

“If your program simply segfaulted, consider yourself lucky.”

-Chuck Stewart

Intro to Memory Corruption


Security
Security

  • What we just did was take control of the program’s execution flow, and bend it the way of our will

  • What if this program was running on a server? Or perhaps running under an admin user?

  • Security – To ensure and maintain complete control of the execution flow of your program

Intro to Memory Corruption


Recap of easy
Recap of ‘easy’

  • This time, we overwrote the return address, effectively telling the program where it should go next

  • What if we could insert our OWN code into the program, and point the return address towards that? - ‘shellcode’

  • … Next time ;)

Intro to Memory Corruption


Some final words
Some final words

  • To really become good at exploitation, you need to have a solid grasp on the low level stuff

  • This means knowing x86 assembly, how the stack works, and how data is typically laid out in memory

Intro to Memory Corruption


If you like what we did here
If you like what we did here…

  • Welcome to real Hacking!

  • Related wargames:

    • io.smashthestack.org

    • exploit-exercises.com/protostar

  • Come to our ‘advanced’ meeting, Wednesday!

  • We’ll be rolling our own shellcode :>

Intro to Memory Corruption


ad