Before we start , I would like to bring your attention to this SLAE course from securitytube which will help you learn Shellcoding - http://www.securitytube-training.com/online-courses/securitytube-linux-assembly-expert/
AGENDA :
1. Introduction to Polymorphic Shellcode
2. Create a new version (polymorphic) of an existing shellcode taken from www.shell-storm.org
3. Newer version of shellcode should not be more than 150% of the original code
1. Introduction to Polymorphic Shellcode:
We replace assembly instructions with other equivalent assembly instructions in order to defeat signature based systems and the functionality of the shellcode remains intact.
For example, the following assembly code snippet should give you an idea of what this means:
xor eax,eax
xor edx,edx
This simply empty/zeroout eax and edx . Exactly the same functionality could be achieved by using:
sub eax,eax
cdq
2. Create a new version (polymorphic) of an existing shellcode taken from www.shell-storm.org :
We will see polymorphic version of three shellcodes obtained from shellstorm -
a) http://shell-storm.org/shellcode/files/shellcode-212.php - Kill all process
b) http://shell-storm.org/shellcode/files/shellcode-752.php - execve ("/bin/sh")
c) http://shell-storm.org/shellcode/files/shellcode-571.php - /bin/cat /etc//passwd
[x] Shellcode 1 : Kill all process
Shellstorm - http://shell-storm.org/shellcode/files/shellcode-212.php
The shellcode was downloaded from shellstorm and then tweaking of instructions are done inorder to achieve polymorphic shellcode.
Original Version from Shellstorm -
Polymorphic Version -
AGENDA :
1. Introduction to Polymorphic Shellcode
2. Create a new version (polymorphic) of an existing shellcode taken from www.shell-storm.org
3. Newer version of shellcode should not be more than 150% of the original code
1. Introduction to Polymorphic Shellcode:
We replace assembly instructions with other equivalent assembly instructions in order to defeat signature based systems and the functionality of the shellcode remains intact.
For example, the following assembly code snippet should give you an idea of what this means:
xor eax,eax
xor edx,edx
This simply empty/zeroout eax and edx . Exactly the same functionality could be achieved by using:
sub eax,eax
cdq
2. Create a new version (polymorphic) of an existing shellcode taken from www.shell-storm.org :
We will see polymorphic version of three shellcodes obtained from shellstorm -
a) http://shell-storm.org/shellcode/files/shellcode-212.php - Kill all process
b) http://shell-storm.org/shellcode/files/shellcode-752.php - execve ("/bin/sh")
c) http://shell-storm.org/shellcode/files/shellcode-571.php - /bin/cat /etc//passwd
[x] Shellcode 1 : Kill all process
Shellstorm - http://shell-storm.org/shellcode/files/shellcode-212.php
The shellcode was downloaded from shellstorm and then tweaking of instructions are done inorder to achieve polymorphic shellcode.
Original Version from Shellstorm -
Polymorphic Version -
[x] Shellcode 2 : execve ("/bin/sh")
Shellstorm - http://shell-storm.org/shellcode/files/shellcode-752.php
The shellcode was downloaded from shellstorm and then tweaking of instructions are done inorder to achieve polymorphic shellcode.
Original Version from Shellstorm -
Polymorphic Version -
[x] Shellcode 3 : set system time to 0 and exit
Shellstorm - http://shell-storm.org/shellcode/files/shellcode-571.php
The shellcode was downloaded from shellstorm and then tweaking of instructions are done inorder to achieve polymorphic shellcode.
Original Version from Shellstorm -
Polymorphic Version -
[x] All codes can be found here - https://github.com/hexachordanu/SLAE/tree/master/Assignment-6
Student-ID: SLAE-1219
Comments
Post a Comment