Functrace : A Function Tracer

Functrace is a tool that helps to analyze a binary file with dynamic instrumentation using DynamoRIO. These are some implemented features (based on DynamoRIO):

  • disassemble all the executed code
  • disassemble a specific function (dump if these are addresses)
  • get arguments of a specific function (dump if these are addresses)
  • get return value of a specific function (dump if this is an address)
  • monitors application signals
  • generate a report file
  • ghidra(https://ghidra-sre.org/) coverage script (based on the functrace report file)

Setup

$ wget https://github.com/DynamoRIO/dynamorio/releases/download/release_7_0_0_rc1/DynamoRIO-Linux-7.0.0-RC1.tar.gz
$ tar xvzf DynamoRIO-Linux-7.0.0-RC1.tar.gz

Or

$ wget https://github.com/DynamoRIO/dynamorio/releases/download/cronbuild-7.91.18047/DynamoRIO-x86_64-Linux-7.91.18047-0.tar.gz
$ tar xvzf DynamoRIO-x86_64-Linux-7.91.18047-0.tar.gz

You can also clone and compile directly DynamoRIO:

$ git clone https://github.com/invictus1306/functrace
$ mkdir -p functrace/build
$ cd functrace/build
$ cmake .. -DDynamoRIO_DIR=/full_DR_path/cmake/
$ make -j4

Also Read – SharpHide : Tool To Create Hidden Registry Keys

Simple DEMO

Using Functrace

$ drrun -c libfunctrace.so -report_file report — target_program [args]

Options

The following [functrace](https://github.com/invictus1306/functrace) options are supported:

-disassembly-> disassemble all the functions
-disas_func function_name -> disassemble only the function function_name
-wrap_function function_name-> wrap the function function_name
-wrap_function_args num_args-> number of arguments of the wrapped function
-cbr-> remove the bb from the cache (in case of conditional jump)
-report_file file_name-> report file name (required)
-verbose-> verbose]

Simple Usage

Option -verbose

$ drrun -c libfunctrace.so -report_file report -verbose — target_program [args]

Option -Disassemby

$ drrun -c libfunctrace.so -report_file report -disassembly — target_program [args]

Option -Disas_Func

$ drrun -c libfunctrace.so -report_file report -disas_func name_function — target_program [args]

Option -wrap_function and -wrap_function_args

$ drrun -c libfunctrace.so -report_file report -wrap_function name_function -wrap_function_args num_args — target_program [args]

Option -CBR

$ drrun -c libfunctrace.so -report_file report -cbr — target_program [args]

CVE-2018-4013 – Vulnerability Analysis

A vulnerability on the LIVE555 RTSP server library. This is the description.

R K

Recent Posts

Kali Linux 2024.4 Released, What’s New?

Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…

4 days ago

Lifetime-Amsi-EtwPatch : Disabling PowerShell’s AMSI And ETW Protections

This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…

4 days ago

GPOHunter – Active Directory Group Policy Security Analyzer

GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…

6 days ago

2024 MITRE ATT&CK Evaluation Results – Cynet Became a Leader With 100% Detection & Protection

Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…

1 week ago

SecHub : Streamlining Security Across Software Development Lifecycles

The free and open-source security platform SecHub, provides a central API to test software with…

2 weeks ago

Hawker : The Comprehensive OSINT Toolkit For Cybersecurity Professionals

Don't worry if there are any bugs in the tool, we will try to fix…

2 weeks ago