Notes - MCS
Reverse Engineering
Notes - MCS
Reverse Engineering
  • Reverse Engineering
  • Introduction to Reverse Engineering
    • What is Reverse Engineering (RE)
    • RE Concepts
    • When do we have RE activities?
    • Why RE is Relevant and Required
    • Limitations of RE
    • Legal Framework
    • What RE Recovers?
    • Software Reversing
    • Low-level languages
  • Files and Filetypes
    • Files
    • File extensions
    • File Signature
    • Content Type Obfuscation
  • Android – Static Analysis
    • Java Language
    • Application Entry Points
    • Application Structure
    • AndroidManifest.xml
    • Exercise 1
    • Exercise 2
    • Exercise 3
    • Exercise 4
    • Native Applications
    • Java Native Interface
    • Android Native Development Kit (NDK)
    • Android binary libraries
    • JNI Dynamic Linking
    • JNI Static Linking
    • Exercise 5 and 6
    • Web and Hybrid applications
  • Android – Dynamic Analysis
    • Dynamic Analysis
    • Logs
    • Network MiTM
    • Certificate Pinning
    • Dynamic Code Instrumentation
    • Dynamic Binary Instrumentation
    • FRIDA
  • Binary Analysis
    • Binary Objects
    • Executable Symbols
    • What is inside an Object File?
    • ELF Files
    • ELF Program Headers
    • Dynamic Linker
      • Example
    • Binary Analysis Process
    • Function detection
    • Calling Conventions
    • Common Logic Structures
    • C++ code
  • Emulation and Instrumentation
    • Dynamic Binary Analysis
    • Considerations
    • Processes
    • Dynamic Binary Instrumentation (DBI)
    • DBI with Qiling
  • Obfuscation Techniques
    • Obfuscation Techniques
    • Content Type Obfuscation
    • Code Obfuscation
  • Serial Communication
    • Comunicação paralelo
    • Comunicação série
    • Sincronização entre transmissor e recetor
    • Sincronização de relógio
    • Transmissão de dados
    • Topologias de comunicação série
    • Elementos de uma ligação série
  • A interface RS-232C
    • RS-232C
    • Estrutura da trama
    • Camada física
    • Taxa de transmissão (baudrate)
    • Receção de dados
    • Identificar parâmetros de comunicaçãoIdentificar parâmetros de comunicação
    • Encontrar a UART
    • Captura de sinais
  • Norma SPI
    • Introdução
    • Descrição geral
    • Operação
    • Simulação do master SPI
    • Arquiteturas de ligação
    • Tipos de transferências
    • Configuração de um master SPI
    • Procedimento para identificação dos sinais
    • Exemplo
  • Norma I2C
    • Introdução
    • Caraterísticas básicas
    • Exemplo de interligação num barramento I2C
    • Terminologia
    • Masters e Slaves
    • Sinalização
    • Endereçamento
    • Transferência de dados
    • Clock stretching
    • Múltiplos masters
    • Arbitragem
    • Endereços reservados
Powered by GitBook
On this page
  • Black box approach
  • Packet dumps
  • Traffic flows
  • Trusted certificates
  • Limitations
  1. Android – Dynamic Analysis

Network MiTM

Interactions with external APIs can be intercepted and analysed.

  • Useful to identify communication with domains with low reputations.

  • Useful to identify unprotected communications.

    • Especially dangerous if dealing with authentication, private data or the download of dynamic components.

Black box approach

Observe how the app behaves.

  • We can simply observe or we can manipulate/ filter traffic.

Packet dumps

Run applications and capture traffic with a packet sniffer.

Non-encrypted APIs can be analyzed with ease.

  • The endpoint IP address may constitute an indicator by itself.

    • Communication with flagged domains, and validation that a service is invoked.

Using wireshark (androiddump).

Traffic flows

Run applications with an HTTP/HTTPS proxy configured to intercept all traffic.

The injection of a CA Certificate in the device allows the generation of custom certificates for secure endpoints.

Using an HTTP proxy with Active TLS interception capability.

  • A proxy will generate certificates for all hosts accessed.

  • Certificates are signed by a single CA.

  • CA must be installed in the device.

Trusted certificates

Standard X509 certificates in PEM format.

  • Preinstalled by the manufacturer.

  • Cannot be changed by users.

  • Users can add custom certificates, but they are frequently ignored by the application.

On Android systems, trusted roots are at /system/etc/security/cacerts.

  • Folder with PEM certificates.

/system partition is read-only on release devices.

  • In recent versions of Android, the same is also true for the emulator.

  • Alternative: mount a tmpfs at the certificate location, but changes are lost on reboot.

Limitations

Packet dumps are limited to unprotected text and metadata.

Traffic flow analysis is limited to devices where a CA can be injected.

  • And where the APP will not use custom CA Certificates.

  • And where the APP will not use Certificate Pinning.

Last updated 1 year ago

Using mitmproxy, without CA installed
Using mitmproxy, with CA installed