1
What is reverse engineering ?

   Reverse engineering is the process of extracting the
knowledge or design blueprints from anything man-made.




                                                          2
What is reverse engineering ?

   Reverse engineering can be practiced on: mechanical
devices, electronic components, or software programs, and we
will focus on reversing software programs


Reversing applications can be seen as "going backwards
through the development cycle”.



                                                          3
What is reverse engineering ?




                                4
Where do we need it?
It is used for
1-Evaluating the level of security that the application
   provides
2-Analyzing and eventually defeat various copy protection
   schemes (cracking)
3-Locating vulnerabilities in operating systems and other
   software
4-Reversing Cryptographic Algorithms
5-Infecting application by viruses or to healing them from
   the infection
                                                             5
Is it legal ?

   It depends on why you are reversing software, it is legal for
education purposes and illegal for stealing password and
private information




                                                              6
Terminology

Patching : A technique of modification of a program.


Serial fishing : Finding the correct password for an
application.


Keygenning : Finding the algorithm that generate the
password of an application.



                                                       7
So how to do it ?

Software reverse engineering requires a combination of
   skills & tools
So to do it we need:
- Tools
- Knowledge
- A working mind , curiosity & the desire to learn



                                                         8
So how to do it ?

Tools

   1-disassemblers: are programs that let us get the
assembly code from any application such as




                                                       9
IDA PRO DISASSEMBLER




                       10
OLLY




       11
So how to do it ?

Tools

   2- Debuggers: they are programs that let us execute
assembly code and see the results of any instruction
   IDA & Olly are also debuggers




                                                         12
So how to do it ?

Tools

  3-Hex editors: they show the content of any file
        (programs) in hexadecimal format, they allow us
        to modify instructions or to get some information
        (header information for ex)
  Ex: hex workshop



                                                            13
HEX WORK SHOP




                14
So how to do it ?

Tools
   4- Other tools : We need also some other tools like :
- Peid
- ImpRec
- metasploit
- …



                                                           15
16
1- Patching applications



Bypassing Authentication

                           17
2 - Password fishing



  Static passwords

                       18
3 - Password fishing



Dynamic passwords

                       19
4 - Keygenning



Create keygen

                 20
Some defense methodes
To protect your application there is many defense methods
such as:

Packers

Protectors

Encryption algoritms

…


                                                            21
Packers

   they compress the application so the constant like text for
example will be changed, and they will be restored after the
execution of the application so we can’t see theme before the
execution
   Ex : UPX , Morphine , Aspack , FSG …




                                                                22
Protectors

   they are small programs fused with the application that
can detect the debugger or the disassembler so they won’t let
us reverse the application
   Sometimes we can find a packer and protector in the same
time
   EX : YodaEncrypt , ARMprotect …




                                                             23
Encryption

   Also there are some other techniques like encrypting the
password by using hash functions like MD5, SHA-1 …




                                                              24
Buffer overflow vulnerability




       Overview ….

                            25
Buffer overflow vulnerability




      Exploitation

                            26
Links:
http://www.kromcrack.com/

    http://tuts4you.com/


http://www.newbiecontest.org
                               27
Thank you

For you attention
                    28

BSides Algiers - Reversing Win32 applications - Yacine Hebbal

  • 1.
  • 2.
    What is reverseengineering ? Reverse engineering is the process of extracting the knowledge or design blueprints from anything man-made. 2
  • 3.
    What is reverseengineering ? Reverse engineering can be practiced on: mechanical devices, electronic components, or software programs, and we will focus on reversing software programs Reversing applications can be seen as "going backwards through the development cycle”. 3
  • 4.
    What is reverseengineering ? 4
  • 5.
    Where do weneed it? It is used for 1-Evaluating the level of security that the application provides 2-Analyzing and eventually defeat various copy protection schemes (cracking) 3-Locating vulnerabilities in operating systems and other software 4-Reversing Cryptographic Algorithms 5-Infecting application by viruses or to healing them from the infection 5
  • 6.
    Is it legal? It depends on why you are reversing software, it is legal for education purposes and illegal for stealing password and private information 6
  • 7.
    Terminology Patching : Atechnique of modification of a program. Serial fishing : Finding the correct password for an application. Keygenning : Finding the algorithm that generate the password of an application. 7
  • 8.
    So how todo it ? Software reverse engineering requires a combination of skills & tools So to do it we need: - Tools - Knowledge - A working mind , curiosity & the desire to learn 8
  • 9.
    So how todo it ? Tools 1-disassemblers: are programs that let us get the assembly code from any application such as 9
  • 10.
  • 11.
  • 12.
    So how todo it ? Tools 2- Debuggers: they are programs that let us execute assembly code and see the results of any instruction IDA & Olly are also debuggers 12
  • 13.
    So how todo it ? Tools 3-Hex editors: they show the content of any file (programs) in hexadecimal format, they allow us to modify instructions or to get some information (header information for ex) Ex: hex workshop 13
  • 14.
  • 15.
    So how todo it ? Tools 4- Other tools : We need also some other tools like : - Peid - ImpRec - metasploit - … 15
  • 16.
  • 17.
  • 18.
    2 - Passwordfishing Static passwords 18
  • 19.
    3 - Passwordfishing Dynamic passwords 19
  • 20.
  • 21.
    Some defense methodes Toprotect your application there is many defense methods such as: Packers Protectors Encryption algoritms … 21
  • 22.
    Packers they compress the application so the constant like text for example will be changed, and they will be restored after the execution of the application so we can’t see theme before the execution Ex : UPX , Morphine , Aspack , FSG … 22
  • 23.
    Protectors they are small programs fused with the application that can detect the debugger or the disassembler so they won’t let us reverse the application Sometimes we can find a packer and protector in the same time EX : YodaEncrypt , ARMprotect … 23
  • 24.
    Encryption Also there are some other techniques like encrypting the password by using hash functions like MD5, SHA-1 … 24
  • 25.
  • 26.
  • 27.
    Links: http://www.kromcrack.com/ http://tuts4you.com/ http://www.newbiecontest.org 27
  • 28.
    Thank you For youattention 28