r/AskReverseEngineering • • Oct 29 '24

Need information about software decompilation.

5 Upvotes

The past month I have put in a lot of hours solving crackmes and writing some write-ups. I have become decent at it, and would like to start more practical projects in the same field.

I’m interested in decompiling software, specifically older games, with the goal of possibly creating mods. I’ve searched for guides or tutorials but mostly find high-level overviews of what decompilation is.

I would like to know:

  • If Decompilation is as simple as looking at the assembly and decompiled pseudocode and producing a working replica?
  • What software is usually used? ( I assume ghidra and IDA but there could be lesser known ones)
  • Are there certain techniques or software features that are essential to know for game decompilation?
  • Do you know of any resources that cover this topic, in more detail?

Note: I am a second year CS student so I have a lot of experience already in forward-engineering. I have written a big project in c++ and a few smaller ones in c, so I do not fear low-level.


r/AskReverseEngineering • • Oct 29 '24

Is there any IDE for x86_64 (Like Mars for MIPS)?

1 Upvotes

r/AskReverseEngineering • • Oct 28 '24

Is it possible to get source code from binary file?

0 Upvotes

r/AskReverseEngineering • • Oct 27 '24

Use Frida to retrieve App's secret to sign JWTs

3 Upvotes

I am using frida to bypass ssl pinning of a flutter app. While I have succeeded so far and am getting the requests and responses in Burp suite I came across the fact that the app seems to generate a new JWT for each request. The JWT includes a timestamp so it has to be signed by the app.

Is there a way to use frida to hook to methods that are doing the signing of the JWTs using the secret and this way log the secret to the console?

Cause I'm pretty sure the secret won't be stored in plaintext in the APK somewhere, right?

How would I proceed?

Any help is appreciated! Thanks!


r/AskReverseEngineering • • Oct 24 '24

Help trying to open files to mod an abandonware PC game.

3 Upvotes

Hey there

Ive been a fan of an old Japanese racing sim game from 2001 called The Real Car Simulator since it was new and I downloaded the demo. I think the car physics still feel great, it runs perfect on a modern os, and Japanese racing games of that era just have a certain vibe to them.

I have a fair bit of game modding experience and on my own I combined the cars and circuits from Nissan edition into the newer Toyota edition engine. As well as using a hex editor learned how to make my own custom racing events and the hex values for the different cars and how to limit which ones can enter, the prize cars, etc.

What id really love to do is be able to modify and add new cars and circuits. It seems the model, the textures, physics data etc are stored in a .bin file. I dont have any real programming experience or any idea how to get into files beyond fairly basic ways. But the game devs didnt make much of an effort to hide files or make them very hard to edit so I suspect these compressed archives are not anything too fancy. Ive even gone as far as trying to track down anyone who may have worked at VR1 Japan lmao.

Here is a video showing some of my work like both makes cars together and the new racing events I added with unique rules and even unlocking cars on winning.

https://youtu.be/7Qx7-SSsv10?si=1zMYMkKzy6O9Vk_e


r/AskReverseEngineering • • Oct 23 '24

Problem with fetch a "server written in c", using axios node js

0 Upvotes

Any one have knowledge in creating http server using c , kindly reacch me out.... 🤝
Problem Description:

I’ve built a simple HTTP server in C that listens on port 4001. It serves different routes (e.g., /home and /audio) and sends responses like HTML or Base64-encoded audio. Everything works fine initially, but I encounter a strange behavior when using axios (Node.js) to make requests to the server:

  1. First axios request works as expected.
  2. If I open the server's endpoint in the browser (e.g., http://localhost:4001/home), it works fine too.
  3. However, subsequent axios requests hang indefinitely. They don’t receive any response until I make another request from the browser.
  4. After making a new browser request, the server first resolves the pending axios request and only then serves the browser request.

Here's my code snipet , I took this code from wikipidea and slightly modified

#include <arpa/inet.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>

int main(void) {
  struct sockaddr_in sa;
  int SocketFD = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
  char *buffer[1024] = {0};
  if (SocketFD == -1) {
    perror("cannot create socket");
    exit(EXIT_FAILURE);
  }

  memset(&sa, 0, sizeof sa);

  sa.sin_family = AF_INET;
  sa.sin_port = htons(1100); // port listen with localhost:1100
  sa.sin_addr.s_addr = htonl(INADDR_ANY);

  if (bind(SocketFD, (struct sockaddr *)&sa, sizeof sa) == -1) {
    perror("bind failed");
    close(SocketFD);
    exit(EXIT_FAILURE);
  }

  if (listen(SocketFD, 10) == -1) {
    perror("listen failed");
    close(SocketFD);
    exit(EXIT_FAILURE);
  }

  for (;;) {
    int ConnectFD = accept(SocketFD, NULL, NULL); // initializing the TCP/IP socket

    if (ConnectFD == -1) {
      perror("accept failed");
      close(SocketFD);
      exit(EXIT_FAILURE);
    }

    read(ConnectFD, buffer, 1024); // read the request from client
    const char *home_response =
        "HTTP/1.1 200 OK\r\n"
        "Access-Control-Allow-Origin: *\r\n"
        "Content-Type: text/html\r\n"
        "Connection: close\r\n\r\n"
        "<html><body><h1>Welcome to Home Page</h1></body></html>"; // response will send back to the client server or Proxy(Axios Node Js)
    write(ConnectFD, home_response, strlen(home_response));
    if (shutdown(ConnectFD, SHUT_RDWR) == -1) {
      perror("shutdown failed");
      close(ConnectFD);
      close(SocketFD);
      exit(EXIT_FAILURE);
    }
    close(ConnectFD);
  }

  close(SocketFD);
  return EXIT_SUCCESS;
}

r/AskReverseEngineering • • Oct 22 '24

Reverse engineering a dumped C program

5 Upvotes

I have a container a C program that is read protected. I need to modify that program a bit, to patch a certain behaviour that I want to change.
It's read/write protected, but I can still execute it, and inject my own code with LD_PRELOAD to simply read most sections from /proc/self/maps. I then tried to reverse it in ghidra. Here is an exemple of what I have:

For a simple C program:
Source:

#include <stdio.h>

int main()
{
    printf("test\n");
    FILE *f = fopen("./output", "w+");
    fwrite("test", 4, 1, f);
    fclose(f);
}

Compiled and dumped using the method above gives me this in ghidra:

undefined8 FUN_001011a9(void)
{
  undefined8 uVar1;
  FUN_00101080(&DAT_00102004);
  uVar1 = FUN_001010a0("./output",&DAT_00102009);
  FUN_001010b0(&DAT_00102004,4,1,uVar1);
  FUN_00101090(uVar1);
  return 0;
}

So I clearly have something, all the function calls/static strings match. Execpt when following a call (here to printf for exemple) ghidra only shows me this:

void FUN_00101080(void)
{
                    /* WARNING: Treating indirect jump as call */
  (*(code *)0x1030)();
  return;
}

From my understanding, that's a call from to a dynamically loaded library (libc). My question is: Is there a way for me to have ghidra automatically resolve thoses calls to libraries ? Do I need to rearrange some sections that I grabbed from the dump ?


r/AskReverseEngineering • • Oct 20 '24

Figuring Out LIN Slave Command Format

1 Upvotes

Hi,

I'm making an interceptor device for a set of Automotive Headlights (now Magnetti) that have AFS. The headlight bending motors are controlled via LIN, and are unfortunately inaccessible to check what LIN driver they are using. There's a central LIN master node in the car which reads the steering angle data, car angle positions and speed and informs the headlights based on this in which directions to point the beam.

I've managed to get a sniff of the headlight network in an attempt to reverse engineer it however am struggling to find out what each message actually does. Here's a breakdown of what I know so far:

  • 0x3C is some kind of master diagnostics PID?
  • 0x37 is the master node inside the car which informs the lights which way to point
  • 0x7D - Unsure but appears to show up at the same time as 0x3C
  • 0xA3 - Headlight motor (vertical)
  • 0xA6 - Headlight motor (horizontal)
  • 0xE7 - Headlight motor (vertical)
  • 0xE2 - Headlight motor (horizontal)

A sample message array would be:

37 30 5A 38 5A 19 04 11 00

A6 71 FF FD 00

E2 79 00 20 00

And another with the other PIDs showing up:

37 30 66 38 66 19 07 F1 FD

A3 70 0B 17 00

E7 78 0B 30 00

E2 79 00 38 00

A6 71 FF E8 00

The initial startup sequence where 0x3C appears has a message of:

3C 80 91 F0 C0 DD 4D 93 8C

This seems to align somewhat with a TMC221 doing dynamic assignment of LIN IDs; the above message is the first message on the network so it would make sense.

TMC221 Datasheet

If anyone has any pointers it'd be much appreciated. Here's the first 5 seconds worth of messages on the network in case anything pops out:

0.034	A3								
0.053	E7								
0.072	E2								
0.091	A6								
0.101	3C	80	91	F0	C0	DD	4D	93	8C
0.12	A3	70	00	00	E0				
0.129	37	10	00	1F	00	1F	00	1F	00
0.187	3C	80	91	F8	C0	DD	4D	97	9C
0.196	3C	80	82	F0	FF	FF	FF	FF	FF
0.206	7D	FE	FF	B1	C0	B6	26	00	03
0.244	E7	78	00	00	E0				
0.254	37	10	00	18	00	1F	00	1F	00
0.292	3C	80	91	F9	C0	DD	4D	92	88
0.301	3C	80	82	F8	FF	FF	FF	FF	FF
0.31	7D	FE	EF	F1	C0	98	26	00	03
0.32	3C	80	89	F0	E0	3A	84	00	E3
0.377	E2	79	00	00	E0				
0.387	37	10	00	18	00	19	00	1F	00
0.406	3C	80	91	F1	C0	DD	4D	96	98
0.415	3C	80	89	F8	E0	3A	84	00	E3
0.425	3C	80	81	F0	FF	FF	FF	FF	FF
0.434	7D	F0	E0	3A	04	E0	0F	F4	FF
0.453	A3	70	00	00	00				
0.51	A6	71	00	00	E0				
0.519	3C	80	89	F9	E2	6A	83	00	F3
0.529	3C	80	81	F8	FF	FF	FF	FF	FF
0.538	7D	F8	E0	3A	04	E0	0F	F4	FF
0.548	37	10	00	18	00	19	00	11	00
0.576	E7	78	00	00	00				
0.624	3C	80	89	F1	E2	6A	83	00	F3
0.634	3C	80	81	F9	FF	FF	FF	FF	FF
0.643	7D	F9	E2	6A	83	E0	0F	F4	FF
0.7	E2	79	00	00	00				
0.729	3C	80	81	F1	FF	FF	FF	FF	FF
0.738	7D	F1	E2	6A	83	E0	0F	F4	FF
0.814	A6	71	00	00	00				
3.433	E7	78	00	00	00				
3.471	A6	71	00	00	10				
3.49	A3	70	00	00	10				
3.509	E7	78	00	00	10				
3.528	E2	79	00	00	10				
3.727	37	10	00	18	00	19	00	11	00
3.746	37	10	00	18	00	19	00	11	00
3.87	7D	F1	E2	6A	83	10	02	F0	FF
3.946	A6	71	00	00	00				
3.956	3C	80	81	F0	FF	FF	FF	FF	FF
3.965	7D	F0	E0	3A	04	10	02	F0	FF
3.984	A3	70	00	00	00				
4.051	3C	80	81	F8	FF	FF	FF	FF	FF
4.06	7D	F8	E0	3A	04	10	02	F0	FF
4.098	E7	78	00	00	00				
4.145	3C	80	81	F9	FF	FF	FF	FF	FF
4.155	7D	F9	E2	6A	83	10	02	F0	FF
4.212	E2	79	00	00	00				
4.315	3C	80	88	F0	9C	F4	C0	E9	80
4.325	3C	80	88	F8	9C	F4	C0	E9	80
4.344	A3	70	FF	AF	00				
4.363	E7	78	FF	7B	00				
4.42	A3	70	FE	03	00				
4.439	E7	78	FD	C5	00				
4.496	A3	70	FC	53	00				
4.515	E7	78	FC	10	00				
4.572	A3	70	FA	A3	00				
4.591	E7	78	FA	5A	00				
4.648	A3	70	F8	F3	00				
4.668	E7	78	F8	A5	00				
4.724	A3	70	F7	43	00				
4.744	E7	78	F6	F2	00				
4.801	A3	70	F5	93	00				
4.82	E7	78	F5	3D	00				
4.877	A3	70	F4	B9	00				
4.896	E7	78	F4	97	00				
4.953	A3	70	F4	18	00				
4.972	E7	78	F3	F4	00

r/AskReverseEngineering • • Oct 19 '24

Reverse engineering old Yamaha sound chip devboard, do you know this communication standard? Red and green one look like UART signals but aren't them, probably. Frequency fluctuates and there are three channels of sync pulses?? (purple, blue and yellow)

Thumbnail
gallery
8 Upvotes

r/AskReverseEngineering • • Oct 19 '24

Windows wont let me run a harmless .exe if I rename it to "patched.exe" or "patch.exe"?!?

2 Upvotes

Hi,

Starting my RE journey and have playing with debugging and patching of files. I happened to call my patched file "patched.exe".. and windows runs it (with an admin popup) but nothing happens.

Rename it to something more benign and it works fine...

Anyone know if this is Windows defender getting in the way ?? I have tried in vain to disable defender on my analysis vm but havent really been successful. Any tips ?

Thanks,

loiphin :)


r/AskReverseEngineering • • Oct 19 '24

need certain logics from an app

1 Upvotes

can anyone help me with how the video (.mpd) and its license is generated i am looking to automate the app for videos ...

i automated and decrypted certain requests and responses withh aes and iv generated dyanamically...
but a value which is present in the header of a lic url is changing in seconds soo i need the function that is creating that


r/AskReverseEngineering • • Oct 19 '24

Has anyone ever tried Revere Engineering a Auto scan tool ?

2 Upvotes

Just wondering if anyone has ever tried to Reverse Enfmgineer a Auto scan tool Obd2 . As a poor mechanic myself. There extremely expensive and honestly just android tablets with special software and cord . I was watching a special on the news about how this tool is killing small business auto repair shops because of price and subscription requirements


r/AskReverseEngineering • • Oct 17 '24

Question, I'm so confused on where to start

5 Upvotes

I would say I'm a decent programmer, been coding for abt a year now, I have always liked the idea of hacking and reverse engineering, but I don't know where to start, i decompiled a few android apps, but the code is always in smali so no dice, i tried for mobile games too, but resource are always for desktop apps, I tried learning to use Frida on mobile apps but no resource seems catered to newbies in RE, I'm stuck, and I really hope some can help me


r/AskReverseEngineering • • Oct 17 '24

Determine a mobile app tech stack

1 Upvotes

Is there any tool out there to determine the tech stack for mobile apps (or even desktop apps) that you know about?
For web apps we have WappAnalyser. For mac, there was an existing app that could determine if it's was native and tell the framework or tell if it was electron.
But what I would be interested in, is a way to do this for mobile apps ? Would be useful to know what an app was made with. Nomatter if it's iOS and android. Was it native with java or kotlin ? Or react native ? or else ? Even better if it can detect some frameworks/libs used


r/AskReverseEngineering • • Oct 15 '24

Question

1 Upvotes

Have anyone worked on SimTower?


r/AskReverseEngineering • • Oct 14 '24

Reverse Engineering to make videogame private server.

2 Upvotes

Hello everyone, I was just trying to create my own server to play a videogame.
I just downloaded a private server done by other for this game and I just fell in love with that.
I have a good understanding of coding so I tried to understand all of the code that I get.
At the moment I have no clue on how to reach this result.

I tried to use ghidra on the executable and some dll files but I had very poor results on code analysis.
I think it's really obfuscated.
So my question is the following: which guide or material I can use to understand what to do?
I cannot find any guide that can help me in this task.


r/AskReverseEngineering • • Oct 13 '24

help to edit bin file of broken panel 1920x1080 monitor board on 1920x1200 working lcd panel.

2 Upvotes

hello, anyone know how to edit bin file of spi chip of monitor? would like to change resolution. there's a black bar at the bottom that show my top screen.


r/AskReverseEngineering • • Oct 13 '24

Decrypting Firmware for Tozo Bluetooth Headphones

1 Upvotes

Hi everyone!

I've been working on a reverse engineering project involving a pair of Tozo Bluetooth headphones. I managed to extract the firmware from the device, but the content is encrypted. My goal is to decrypt it to better understand how the device works.

I've analyzed the firmware using tools like binwalk, but it hasn't revealed much about the encryption method. Additionally, I've noticed that the Tozo app related to the headphones seems to handle the encryption and decryption processes directly. Before going further and potentially rooting my tablet to use tools like Frida for this, I'd like to ask if anyone here has experience with similar cases.

Have you successfully intercepted encryption keys from an app using Frida or any other method? Any advice or insights would be greatly appreciated!

Thanks in advance!


r/AskReverseEngineering • • Oct 10 '24

Has anyone done RE on Android app packed by baidu (libbaiduprotect.so)?

4 Upvotes

I have done RE on Android app (for home Automation) which is protected by baidu packer previously but they have now a better protection against frida or any dynamic Instrumentation. I'm wondering if someone has bypass the latest protection too?


r/AskReverseEngineering • • Oct 10 '24

extract alight motion functionality

1 Upvotes

context: alight motion is an cross platform mobile application for video editing, it uses a xml based format for defining the how the video should be displayed, called presets,

i have vague knowledge about reverse engineering topics, but i have basic knowledge like dissassembler, network analysis tool, binary files and decent programming knowledge

the idea is to extract the alight motion video processing feature. and uses them for my use case (which is batch video editing). from handling input preset, then exporting the video result. all that running on background as automated process


r/AskReverseEngineering • • Oct 09 '24

recompiling pyinstxtractor output

1 Upvotes

Is there any way to recompile the pyinstaller exe only with the pyinstxtractor output? (Without using pycdc or anything like ot get the .py file)


r/AskReverseEngineering • • Oct 06 '24

Is it possible to add data on external DLL to ida project?

1 Upvotes

Hey everyone I am reversing a game and I am trying to improve some aspects of window mode.
I found where the pointer to directX 9 is loaded and I see it used across the code.

char __thiscall DirectX3D9_initialization_and_set_window_handle(HWND this)

{

IDirect3D9 *ptr_v2; // esi

hWnd = this;

ptr_v2 = Direct3DCreate9(32u);

if ( PTR_Direct3DCreate9 )

(*(*PTR_Direct3DCreate9 + 8))(PTR_Direct3DCreate9);

PTR_Direct3DCreate9 = ptr_v2;

if ( !ptr_v2 || !sub_40E580() )

return 0;

au_re_SetUnhandledExceptionFilter();

return 1;

}

\```

Here is an an example usage of it.

char __userpurge update_ScreenParameters@<al>(ScreenParameters *ScreenParameters_a1@<eax>, ScreenParameters *ScreenParameters_a2)

{

int v4; // eax

int counter_v5; // ecx

int res_width; // ebx

_DWORD *i; // edx

char *v8; // eax

int v9; // edi

void *v10; // eax

HWND main_window_handle_v11; // edx

int v12; // eax

int v13; // edx

void *v14; // ecx

int v15[3]; // [esp+1Ch] [ebp-10h] BYREF

int v16; // [esp+28h] [ebp-4h]

memset(ScreenParameters_a1, 0, sizeof(ScreenParameters));

if ( (*(*PTR_Direct3DCreate9 + 32))(PTR_Direct3DCreate9, 0, v15) < 0 )

return 0;

ScreenParameters_a1->is_something_related_to_colour_depth = 0;

ScreenParameters_a1->var7 = 1;

ScreenParameters_a1->is_vsync_on = VAR_gfx_vsync != 0 ? 1 : 0x80000000;

if ( ScreenParameters_a2->is_something_related_to_colour_depth != 1 )

{

if ( return_colour_depth_based_on_a1(v16) != ScreenParameters_a2->colour_depth )

return 0;

ScreenParameters_a1->res_width = ScreenParameters_a2->res_width;

ScreenParameters_a1->res_height = ScreenParameters_a2->res_height;

ScreenParameters_a1->main_window_handle = hWnd;

ScreenParameters_a1->colour_depth = v14;

ScreenParameters_a1->var4 = v13;

ScreenParameters_a1->is_window_mode = v13;

ScreenParameters_a1->var10 = v13;

ScreenParameters_a1->var11 = sub_40CF10(v14, v14);

sub_40CFF0(ScreenParameters_a1);

return 1;

}

v4 = (dword_F97B74 - dword_F97B70) / 36;

counter_v5 = 0;

if ( v4 <= 0 )

return 0;

res_width = ScreenParameters_a2->res_width;

for ( i = dword_F97B70 + 20;

*(i - 1) != res_width || *i != ScreenParameters_a2->res_height || i[1] != ScreenParameters_a2->colour_depth;

i += 9 )

{

if ( ++counter_v5 >= v4 )

return 0;

}

v8 = dword_F97B70 + 36 * counter_v5;

v9 = *(v8 + 2);

v10 = *(v8 + 3);

ScreenParameters_a1->res_width = res_width;

main_window_handle_v11 = hWnd;

ScreenParameters_a1->res_height = ScreenParameters_a2->res_height;

ScreenParameters_a1->colour_depth = v10;

ScreenParameters_a1->var4 = 1;

ScreenParameters_a1->main_window_handle = main_window_handle_v11;

ScreenParameters_a1->is_window_mode = 0;

ScreenParameters_a1->var10 = 1;

v12 = sub_40CF10(v10, v10);

ScreenParameters_a1->var13 = v9;

ScreenParameters_a1->var11 = v12;

sub_40CFF0(ScreenParameters_a1);

return 1;

}

Is there a place I can take a look at and load the class for the directX in ida so I know what functions are get called and what they do? To be honest I don't think I need to even load the DLL I just want to know what they do so I can improve the way the game presentation features.


r/AskReverseEngineering • • Oct 02 '24

help... get API

1 Upvotes

I can't get the API of the kakaopage app. Is there anyone who can help?


r/AskReverseEngineering • • Oct 01 '24

Seeking Advice on Implementing a Secure Data Scraping Solution for Healthcare Portal

1 Upvotes

Hello everyone,

We're a healthcare company working on a feature that involves securely accessing data from insurance portals based on user consent. We need to retrieve health-related data, such as claims and copay information, after users provide their credentials and permission.

We have tried both Selenium-based scraping and reverse engineering the internal APIs of these portals but ran into issues with consistency and security. What would be the best approach to tackle this problem? Are there any reliable tools or best practices you would recommend for securely scraping or reading data from these types of portals?

Appreciate your insights!