SlideShare a Scribd company logo
Exploit Research and Development Megaprimer: Unicode Based Exploit Development
@ajinabraham
ASCII UNICODE CHART
@ajinabraham
•
•
•
@ajinabraham
•
•
@ajinabraham
@ajinabraham
@ajinabraham
nSEH
•JMP TO SHELLCODE
(xebx06x90x90)
SEH
•POP,POP,RET SEQUENCE
Shellcode
•SHELLCODE
EIP
1
2
3
@ajinabraham
•
nSEH
•JMP TO SHELLCODE
We can’t use actual JMP. We will walk to shellcode
We will use single byte instructions along with some NOP
like harmless aligning instructions(Venetian Shellcode).
SEH
•POP,POP,RET SEQUENCE (The address will be of the format
0x00aa00bb)
Shellcode
•UNICODE SHELLCODE (Shellcode is Decoder + Shellcode.
So we have to point a register to the decoder and jump
to it. We use venetian shellcode technique for alignment.)
EIP
1
2
3
@ajinabraham
•
•
• JMP TO SHELLCODE
We can’t use actual JMP. We will walk to shellcode
We will use single byte instructions along with some NOP
like harmless aligning instructions(Venetian Shellcode).
nSEH
You need to try out
and choose the
working one.
But you can check it
only after you check
SEH
popad/inc eax or
selecting the nops
Example
“x61x41” implies 61 ->POPAD
004100 ->ADD BYTE PTR DS:[ECX],AL
“x41x71” implies 41 ->INC ECX
007100 ->ADD BYTE PTR DS:[ECX],DH
1Byte Instruction
41 : INC ECX
61 POPAD
@ajinabraham
SEH
•POP,POP,RET SEQUENCE (The address will be of the format
0x00aa00bb)
Selecting Suitable Address
• The Address range should
be between 0x00 and 0x7f
• Choose address from
modules without SAFESEH
• Address should be in the
format 0x00aa00bb
• Say if you choose “0x004d0041” then specify “x41x4d”(little endian) in the shellcode.
• “00” will be prepended by the program during execution.
• Even if we get suitable addresses, all of these don’t work. You have to try out each address
to find out the address that doesn’t harm the execution flow and reaches at our shellcode.
!mona seh –cp unicode Suitable Address
0x004b00cb
0x004a0041
0x004a0059
0x004d0041
0x004100f2
0x004c0020
@ajinabraham
• Generate the shellcode with Metasploit alone or use SkyLined’s alpha2 encoder.
msfpayload windows/exec CMD=calc R | msfencode -e x86/unicode_upper BufferRegister=EAX -t raw
msfpayload windows/exec CMD=calc R | ./alpha2 eax –unicode –uppercase
• We need to point a register to contain our shellcode and jump to it. For alignment we use venetian shellcode
technique.
• We will use EAX to contain our shellcode.
Shellcode
UNICODE SHELLCODE (Shellcode is Decoder +
Shellcode. So we have to point a register to the
decoder and jump to it. We use venetian shellcode
technique for alignment.)
Shellcode
Shellcode
Decoder
@ajinabraham
•
@ajinabraham
• You will need to properly align the set of instructions with venetian shellcode so that it won’t
break at execution time.
• You should be creative. You should analyze the execution flow in the debugger.
• At times we need to add extra venetian shellcode at the beginning and end to properly align everything.
• So for example the previous code after adding some venetian shellcode may look like this.
"x58“ pop eax # take the value of ebp and pop it to eax
"x71“ # Venetian Padding
"x05xbbxaa" add eax,0xaa00bb00 # 
"x71" # Venetian Padding > Add and Subtract,(0xaa00bb00 >0xcc00dd00) will give you a positive value X, and will be added to EAX in effect.
"x2dxddxcc" sub eax,0xcc00dd00 # /
"x71" # Venetian Padding
"x50" push eax # push the new value of EAX in stack
"x71" # Venetian Padding
"xC3" ret # Return the address of shellcode in EAX to EIP for execution
• Add sufficient NOP like instruction to reach our shellcode.
• MSF Pattern can be used but better just tryout yourself manually.
@ajinabraham
•
•
•
•
• https://www.corelan.be/index.php/2009/11/06/exploit-writing-tutorial-part-7-unic
ode-from-0x00410041-to-calc
• http://www.fuzzysecurity.com/tutorials/expDev/5.html
• http://net-ninja.net/article/2010/May/29/unicode-the-magic-of-exploiting-0x00410041/

More Related Content

What's hot (20)

Introduction to Debuggers
Introduction to Debuggers
Saumil Shah
 
Course lecture - An introduction to the Return Oriented Programming
Course lecture - An introduction to the Return Oriented Programming
Jonathan Salwan
 
Introduction to Functional Programming (w/ JS)
Introduction to Functional Programming (w/ JS)
Allan Marques Baptista
 
Operating Systems - A Primer
Operating Systems - A Primer
Saumil Shah
 
Arduino section programming slides
Arduino section programming slides
vivek k
 
PHP 7 OPCache extension review
PHP 7 OPCache extension review
julien pauli
 
Arduino sectionprogramming slides
Arduino sectionprogramming slides
Jorge Joens
 
Dive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented Programming
Saumil Shah
 
PHP7 is coming
PHP7 is coming
julien pauli
 
Phpをいじり倒す10の方法
Phpをいじり倒す10の方法
Moriyoshi Koizumi
 
Quick tour of PHP from inside
Quick tour of PHP from inside
julien pauli
 
Php engine
Php engine
julien pauli
 
PHP traits, treat or threat?
PHP traits, treat or threat?
Nick Belhomme
 
Profiling php5 to php7
Profiling php5 to php7
julien pauli
 
PHP Tips for certification - OdW13
PHP Tips for certification - OdW13
julien pauli
 
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
GangSeok Lee
 
Specs Presentation
Specs Presentation
Synesso
 
Php and threads ZTS
Php and threads ZTS
julien pauli
 
Linux Shellcode disassembling
Linux Shellcode disassembling
Harsh Daftary
 
Exception handling poirting in gcc
Exception handling poirting in gcc
Shiva Chen
 
Introduction to Debuggers
Introduction to Debuggers
Saumil Shah
 
Course lecture - An introduction to the Return Oriented Programming
Course lecture - An introduction to the Return Oriented Programming
Jonathan Salwan
 
Introduction to Functional Programming (w/ JS)
Introduction to Functional Programming (w/ JS)
Allan Marques Baptista
 
Operating Systems - A Primer
Operating Systems - A Primer
Saumil Shah
 
Arduino section programming slides
Arduino section programming slides
vivek k
 
PHP 7 OPCache extension review
PHP 7 OPCache extension review
julien pauli
 
Arduino sectionprogramming slides
Arduino sectionprogramming slides
Jorge Joens
 
Dive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented Programming
Saumil Shah
 
Phpをいじり倒す10の方法
Phpをいじり倒す10の方法
Moriyoshi Koizumi
 
Quick tour of PHP from inside
Quick tour of PHP from inside
julien pauli
 
PHP traits, treat or threat?
PHP traits, treat or threat?
Nick Belhomme
 
Profiling php5 to php7
Profiling php5 to php7
julien pauli
 
PHP Tips for certification - OdW13
PHP Tips for certification - OdW13
julien pauli
 
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
GangSeok Lee
 
Specs Presentation
Specs Presentation
Synesso
 
Php and threads ZTS
Php and threads ZTS
julien pauli
 
Linux Shellcode disassembling
Linux Shellcode disassembling
Harsh Daftary
 
Exception handling poirting in gcc
Exception handling poirting in gcc
Shiva Chen
 

Viewers also liked (20)

07 - Bypassing ASLR, or why X^W matters
07 - Bypassing ASLR, or why X^W matters
Alexandre Moneger
 
Efficient Bytecode Analysis: Linespeed Shellcode Detection
Efficient Bytecode Analysis: Linespeed Shellcode Detection
Georg Wicherski
 
Design and implementation_of_shellcodes
Design and implementation_of_shellcodes
Amr Ali
 
Anatomy of A Shell Code, Reverse engineering
Anatomy of A Shell Code, Reverse engineering
Abhineet Ayan
 
Java Shellcode Execution
Java Shellcode Execution
Ryan Wincey
 
05 - Bypassing DEP, or why ASLR matters
05 - Bypassing DEP, or why ASLR matters
Alexandre Moneger
 
Shellcode and heapspray detection in phoneyc
Shellcode and heapspray detection in phoneyc
Z Chen
 
Rooting Your Internals: Inter-Protocol Exploitation, custom shellcode and BeEF
Rooting Your Internals: Inter-Protocol Exploitation, custom shellcode and BeEF
Michele Orru
 
Anton Dorfman. Shellcode Mastering.
Anton Dorfman. Shellcode Mastering.
Positive Hack Days
 
Talking about exploit writing
Talking about exploit writing
sbha0909
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
midnite_runr
 
Shellcode Analysis - Basic and Concept
Shellcode Analysis - Basic and Concept
Julia Yu-Chin Cheng
 
Hacking school computers for fun profit and better grades short
Hacking school computers for fun profit and better grades short
Vincent Ohprecio
 
One Shellcode to Rule Them All: Cross-Platform Exploitation
One Shellcode to Rule Them All: Cross-Platform Exploitation
Quinn Wilton
 
Software Exploits
Software Exploits
KevinCSmallwood
 
Shellcode injection
Shellcode injection
Dhaval Kapil
 
Writing Metasploit Plugins
Writing Metasploit Plugins
amiable_indian
 
Rooting your internals - Exploiting Internal Network Vulns via the Browser Us...
Rooting your internals - Exploiting Internal Network Vulns via the Browser Us...
Michele Orru
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-one
DefconRussia
 
Low Level Exploits
Low Level Exploits
hughpearse
 
07 - Bypassing ASLR, or why X^W matters
07 - Bypassing ASLR, or why X^W matters
Alexandre Moneger
 
Efficient Bytecode Analysis: Linespeed Shellcode Detection
Efficient Bytecode Analysis: Linespeed Shellcode Detection
Georg Wicherski
 
Design and implementation_of_shellcodes
Design and implementation_of_shellcodes
Amr Ali
 
Anatomy of A Shell Code, Reverse engineering
Anatomy of A Shell Code, Reverse engineering
Abhineet Ayan
 
Java Shellcode Execution
Java Shellcode Execution
Ryan Wincey
 
05 - Bypassing DEP, or why ASLR matters
05 - Bypassing DEP, or why ASLR matters
Alexandre Moneger
 
Shellcode and heapspray detection in phoneyc
Shellcode and heapspray detection in phoneyc
Z Chen
 
Rooting Your Internals: Inter-Protocol Exploitation, custom shellcode and BeEF
Rooting Your Internals: Inter-Protocol Exploitation, custom shellcode and BeEF
Michele Orru
 
Anton Dorfman. Shellcode Mastering.
Anton Dorfman. Shellcode Mastering.
Positive Hack Days
 
Talking about exploit writing
Talking about exploit writing
sbha0909
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
midnite_runr
 
Shellcode Analysis - Basic and Concept
Shellcode Analysis - Basic and Concept
Julia Yu-Chin Cheng
 
Hacking school computers for fun profit and better grades short
Hacking school computers for fun profit and better grades short
Vincent Ohprecio
 
One Shellcode to Rule Them All: Cross-Platform Exploitation
One Shellcode to Rule Them All: Cross-Platform Exploitation
Quinn Wilton
 
Shellcode injection
Shellcode injection
Dhaval Kapil
 
Writing Metasploit Plugins
Writing Metasploit Plugins
amiable_indian
 
Rooting your internals - Exploiting Internal Network Vulns via the Browser Us...
Rooting your internals - Exploiting Internal Network Vulns via the Browser Us...
Michele Orru
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-one
DefconRussia
 
Low Level Exploits
Low Level Exploits
hughpearse
 
Ad

Similar to Exploit Research and Development Megaprimer: Unicode Based Exploit Development (20)

CyberLink LabelPrint 2.5 Exploitation Process
CyberLink LabelPrint 2.5 Exploitation Process
Thomas Gregory
 
writing self-modifying code and utilizing advanced assembly techniques
writing self-modifying code and utilizing advanced assembly techniques
Russell Sanford
 
x86
x86
Wei-Bo Chen
 
Exploit techniques - a quick review
Exploit techniques - a quick review
Ce.Se.N.A. Security
 
Shellcode mastering
Shellcode mastering
Positive Hack Days
 
17
17
dano2osu
 
Shellcodes for ARM: Your Pills Don't Work on Me, x86
Shellcodes for ARM: Your Pills Don't Work on Me, x86
Svetlana Gaivoronski
 
Qemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System Emulation
National Cheng Kung University
 
Kernel Recipes 2014 - x86 instruction encoding and the nasty hacks we do in t...
Kernel Recipes 2014 - x86 instruction encoding and the nasty hacks we do in t...
Anne Nicolas
 
unit1.pdf
unit1.pdf
SaruM1
 
Lec06
Lec06
siddu kadiwal
 
Instructions_introductionM2.1.about.microcontrollerppt
Instructions_introductionM2.1.about.microcontrollerppt
yesmskai
 
Flag control
Flag control
Robert Almazan
 
8086 arch instns
8086 arch instns
Ram Babu
 
8051 assembly programming
8051 assembly programming
sergeiseq
 
X86 assembly & GDB
X86 assembly & GDB
Jian-Yu Li
 
Virtual machine re building
Virtual machine re building
Martin Dominguez Alvarez
 
fg.workshop: Software vulnerability
fg.workshop: Software vulnerability
fg.informatik Universität Basel
 
Lec05
Lec05
siddu kadiwal
 
Защищая С++. Павел Филонов ➠ CoreHard Autumn 2019
Защищая С++. Павел Филонов ➠ CoreHard Autumn 2019
corehard_by
 
CyberLink LabelPrint 2.5 Exploitation Process
CyberLink LabelPrint 2.5 Exploitation Process
Thomas Gregory
 
writing self-modifying code and utilizing advanced assembly techniques
writing self-modifying code and utilizing advanced assembly techniques
Russell Sanford
 
Exploit techniques - a quick review
Exploit techniques - a quick review
Ce.Se.N.A. Security
 
Shellcodes for ARM: Your Pills Don't Work on Me, x86
Shellcodes for ARM: Your Pills Don't Work on Me, x86
Svetlana Gaivoronski
 
Kernel Recipes 2014 - x86 instruction encoding and the nasty hacks we do in t...
Kernel Recipes 2014 - x86 instruction encoding and the nasty hacks we do in t...
Anne Nicolas
 
unit1.pdf
unit1.pdf
SaruM1
 
Instructions_introductionM2.1.about.microcontrollerppt
Instructions_introductionM2.1.about.microcontrollerppt
yesmskai
 
8086 arch instns
8086 arch instns
Ram Babu
 
8051 assembly programming
8051 assembly programming
sergeiseq
 
X86 assembly & GDB
X86 assembly & GDB
Jian-Yu Li
 
Защищая С++. Павел Филонов ➠ CoreHard Autumn 2019
Защищая С++. Павел Филонов ➠ CoreHard Autumn 2019
corehard_by
 
Ad

More from Ajin Abraham (20)

AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Injecting Security into Web apps at Runtime Whitepaper
Injecting Security into Web apps at Runtime Whitepaper
Ajin Abraham
 
Injecting Security into vulnerable web apps at Runtime
Injecting Security into vulnerable web apps at Runtime
Ajin Abraham
 
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
Ajin Abraham
 
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Ajin Abraham
 
Automated Security Analysis of Android & iOS Applications with Mobile Securit...
Automated Security Analysis of Android & iOS Applications with Mobile Securit...
Ajin Abraham
 
G4H Webcast: Automated Security Analysis of Mobile Applications with Mobile S...
G4H Webcast: Automated Security Analysis of Mobile Applications with Mobile S...
Ajin Abraham
 
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
Ajin Abraham
 
Hacking Tizen: The OS of everything - Whitepaper
Hacking Tizen: The OS of everything - Whitepaper
Ajin Abraham
 
Hacking Tizen : The OS of Everything - Nullcon Goa 2015
Hacking Tizen : The OS of Everything - Nullcon Goa 2015
Ajin Abraham
 
Abusing Exploiting and Pwning with Firefox Addons
Abusing Exploiting and Pwning with Firefox Addons
Ajin Abraham
 
Abusing Google Apps and Data API: Google is My Command and Control Center
Abusing Google Apps and Data API: Google is My Command and Control Center
Ajin Abraham
 
Exploit Research and Development Megaprimer: mona.py, Exploit Writer's Swiss ...
Exploit Research and Development Megaprimer: mona.py, Exploit Writer's Swiss ...
Ajin Abraham
 
Exploit Research and Development Megaprimer: Buffer overflow for beginners
Exploit Research and Development Megaprimer: Buffer overflow for beginners
Ajin Abraham
 
OWASP Xenotix XSS Exploit Framework v3 : Nullcon Goa 2013
OWASP Xenotix XSS Exploit Framework v3 : Nullcon Goa 2013
Ajin Abraham
 
Pwning with XSS: from alert() to reverse shell: Defcon Banglore 2013
Pwning with XSS: from alert() to reverse shell: Defcon Banglore 2013
Ajin Abraham
 
Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...
Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...
Ajin Abraham
 
Abusing, Exploiting and Pwning with Firefox Add-ons
Abusing, Exploiting and Pwning with Firefox Add-ons
Ajin Abraham
 
Xenotix XSS Exploit Framework: Clubhack 2012
Xenotix XSS Exploit Framework: Clubhack 2012
Ajin Abraham
 
Wi-Fi Security with Wi-Fi P+
Wi-Fi Security with Wi-Fi P+
Ajin Abraham
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Injecting Security into Web apps at Runtime Whitepaper
Injecting Security into Web apps at Runtime Whitepaper
Ajin Abraham
 
Injecting Security into vulnerable web apps at Runtime
Injecting Security into vulnerable web apps at Runtime
Ajin Abraham
 
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
Ajin Abraham
 
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Ajin Abraham
 
Automated Security Analysis of Android & iOS Applications with Mobile Securit...
Automated Security Analysis of Android & iOS Applications with Mobile Securit...
Ajin Abraham
 
G4H Webcast: Automated Security Analysis of Mobile Applications with Mobile S...
G4H Webcast: Automated Security Analysis of Mobile Applications with Mobile S...
Ajin Abraham
 
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
Ajin Abraham
 
Hacking Tizen: The OS of everything - Whitepaper
Hacking Tizen: The OS of everything - Whitepaper
Ajin Abraham
 
Hacking Tizen : The OS of Everything - Nullcon Goa 2015
Hacking Tizen : The OS of Everything - Nullcon Goa 2015
Ajin Abraham
 
Abusing Exploiting and Pwning with Firefox Addons
Abusing Exploiting and Pwning with Firefox Addons
Ajin Abraham
 
Abusing Google Apps and Data API: Google is My Command and Control Center
Abusing Google Apps and Data API: Google is My Command and Control Center
Ajin Abraham
 
Exploit Research and Development Megaprimer: mona.py, Exploit Writer's Swiss ...
Exploit Research and Development Megaprimer: mona.py, Exploit Writer's Swiss ...
Ajin Abraham
 
Exploit Research and Development Megaprimer: Buffer overflow for beginners
Exploit Research and Development Megaprimer: Buffer overflow for beginners
Ajin Abraham
 
OWASP Xenotix XSS Exploit Framework v3 : Nullcon Goa 2013
OWASP Xenotix XSS Exploit Framework v3 : Nullcon Goa 2013
Ajin Abraham
 
Pwning with XSS: from alert() to reverse shell: Defcon Banglore 2013
Pwning with XSS: from alert() to reverse shell: Defcon Banglore 2013
Ajin Abraham
 
Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...
Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...
Ajin Abraham
 
Abusing, Exploiting and Pwning with Firefox Add-ons
Abusing, Exploiting and Pwning with Firefox Add-ons
Ajin Abraham
 
Xenotix XSS Exploit Framework: Clubhack 2012
Xenotix XSS Exploit Framework: Clubhack 2012
Ajin Abraham
 
Wi-Fi Security with Wi-Fi P+
Wi-Fi Security with Wi-Fi P+
Ajin Abraham
 

Recently uploaded (20)

How to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRM
Celine George
 
Nice Dream.pdf /
Nice Dream.pdf /
ErinUsher3
 
Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...
EduSkills OECD
 
Coleoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptx
Arshad Shaikh
 
Search Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website Success
Muneeb Rana
 
Parenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independence
Pooky Knightsmith
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Dr. Ravi Shankar Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
"Hymenoptera: A Diverse and Fascinating Order".pptx
"Hymenoptera: A Diverse and Fascinating Order".pptx
Arshad Shaikh
 
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Celine George
 
Unit 3 Poster Sketches with annotations.pptx
Unit 3 Poster Sketches with annotations.pptx
bobby205207
 
LDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad Updates
LDM & Mia eStudios
 
Module 4 Presentation - Enhancing Competencies and Engagement Strategies in Y...
Module 4 Presentation - Enhancing Competencies and Engagement Strategies in Y...
GeorgeDiamandis11
 
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
parmarjuli1412
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
SweetytamannaMohapat
 
Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..
faizanaltaf231
 
How to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRM
Celine George
 
Nice Dream.pdf /
Nice Dream.pdf /
ErinUsher3
 
Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...
EduSkills OECD
 
Coleoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptx
Arshad Shaikh
 
Search Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website Success
Muneeb Rana
 
Parenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independence
Pooky Knightsmith
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
"Hymenoptera: A Diverse and Fascinating Order".pptx
"Hymenoptera: A Diverse and Fascinating Order".pptx
Arshad Shaikh
 
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Celine George
 
Unit 3 Poster Sketches with annotations.pptx
Unit 3 Poster Sketches with annotations.pptx
bobby205207
 
LDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad Updates
LDM & Mia eStudios
 
Module 4 Presentation - Enhancing Competencies and Engagement Strategies in Y...
Module 4 Presentation - Enhancing Competencies and Engagement Strategies in Y...
GeorgeDiamandis11
 
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
parmarjuli1412
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
SweetytamannaMohapat
 
Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..
faizanaltaf231
 

Exploit Research and Development Megaprimer: Unicode Based Exploit Development

  • 8. @ajinabraham • nSEH •JMP TO SHELLCODE We can’t use actual JMP. We will walk to shellcode We will use single byte instructions along with some NOP like harmless aligning instructions(Venetian Shellcode). SEH •POP,POP,RET SEQUENCE (The address will be of the format 0x00aa00bb) Shellcode •UNICODE SHELLCODE (Shellcode is Decoder + Shellcode. So we have to point a register to the decoder and jump to it. We use venetian shellcode technique for alignment.) EIP 1 2 3
  • 9. @ajinabraham • • • JMP TO SHELLCODE We can’t use actual JMP. We will walk to shellcode We will use single byte instructions along with some NOP like harmless aligning instructions(Venetian Shellcode). nSEH You need to try out and choose the working one. But you can check it only after you check SEH popad/inc eax or selecting the nops Example “x61x41” implies 61 ->POPAD 004100 ->ADD BYTE PTR DS:[ECX],AL “x41x71” implies 41 ->INC ECX 007100 ->ADD BYTE PTR DS:[ECX],DH 1Byte Instruction 41 : INC ECX 61 POPAD
  • 10. @ajinabraham SEH •POP,POP,RET SEQUENCE (The address will be of the format 0x00aa00bb) Selecting Suitable Address • The Address range should be between 0x00 and 0x7f • Choose address from modules without SAFESEH • Address should be in the format 0x00aa00bb • Say if you choose “0x004d0041” then specify “x41x4d”(little endian) in the shellcode. • “00” will be prepended by the program during execution. • Even if we get suitable addresses, all of these don’t work. You have to try out each address to find out the address that doesn’t harm the execution flow and reaches at our shellcode. !mona seh –cp unicode Suitable Address 0x004b00cb 0x004a0041 0x004a0059 0x004d0041 0x004100f2 0x004c0020
  • 11. @ajinabraham • Generate the shellcode with Metasploit alone or use SkyLined’s alpha2 encoder. msfpayload windows/exec CMD=calc R | msfencode -e x86/unicode_upper BufferRegister=EAX -t raw msfpayload windows/exec CMD=calc R | ./alpha2 eax –unicode –uppercase • We need to point a register to contain our shellcode and jump to it. For alignment we use venetian shellcode technique. • We will use EAX to contain our shellcode. Shellcode UNICODE SHELLCODE (Shellcode is Decoder + Shellcode. So we have to point a register to the decoder and jump to it. We use venetian shellcode technique for alignment.) Shellcode Shellcode Decoder
  • 13. @ajinabraham • You will need to properly align the set of instructions with venetian shellcode so that it won’t break at execution time. • You should be creative. You should analyze the execution flow in the debugger. • At times we need to add extra venetian shellcode at the beginning and end to properly align everything. • So for example the previous code after adding some venetian shellcode may look like this. "x58“ pop eax # take the value of ebp and pop it to eax "x71“ # Venetian Padding "x05xbbxaa" add eax,0xaa00bb00 # "x71" # Venetian Padding > Add and Subtract,(0xaa00bb00 >0xcc00dd00) will give you a positive value X, and will be added to EAX in effect. "x2dxddxcc" sub eax,0xcc00dd00 # / "x71" # Venetian Padding "x50" push eax # push the new value of EAX in stack "x71" # Venetian Padding "xC3" ret # Return the address of shellcode in EAX to EIP for execution • Add sufficient NOP like instruction to reach our shellcode. • MSF Pattern can be used but better just tryout yourself manually.