You are on page 1of 7

SecurityTube

 Linux  Assembly  Expert  


(SLAE64)  

Training:                                            hNp://www.SecurityTube-­‐Training.com    
 
Pentester  Academy:  hNp://www.PentesterAcademy.com    

Vivek  Ramachandran  
SWSE,  SMFE,  SPSE,  SGDE,  SISE,  SLAE32,64  Course  Instructor  
©SecurityTube.net  
Module  2:  IntroducSon  to  Shellcoding  

23.  Crypters  

Vivek  Ramachandran  
SWSE,  SMFE,  SPSE,  SGDE,  SISE,  SLAE32  Course  Instructor  

hNp://SecurityTube-­‐Training.com    

©SecurityTube.net  
Crypters  

•  Encrypt  Executable  /  Shellcode  

•  Decrypt  at  runSme  and  run  

•  For  powerful  crypto  techniques  like  RC4,  AES  


etc.  a  lot  of  assembly  code  

•  Shellcode  size  too  large  to  be  useful  

©SecurityTube.net  
RC4  

•  Symmetric  Stream  Cipher    

•  2  Step  process:  
–  Key  Scheduling  Algorithm  

–  Pseudo  Random  Number  GeneraSon    

•  Full  Details:  hNp://en.wikipedia.org/wiki/RC4    

©SecurityTube.net  
WriSng  an  RC4  Shellcode  Crypter  in  C  

•  EncrypSon  Phase:    
–  For  a  given  key,  encrypts  shellcode  

•  DecrypSon  Phase:  
–  For  the  same  key,  decrypts  shellcode  
–  Executes  it  

©SecurityTube.net  
RC4  in  Assembly  

•  hNps://thunked.org/programming/rc4-­‐in-­‐
assembly-­‐t23.html  

•  hNp://youritguy.wordpress.com/2010/06/13/
adler-­‐32-­‐and-­‐rc4-­‐in-­‐inline-­‐assembly/    

•  hNp://nayuki.eigenstate.org/page/rc4-­‐cipher-­‐
in-­‐x86-­‐assembly    

©SecurityTube.net  
Pentester  Academy  

©SecurityTube.net  

You might also like