Questions tagged [c]

General purpose programming language that uses the procedural and structured programming paradigm.

Filter by
Sorted by
Tagged with
1 vote
1 answer
117 views

Identifying C/C++ Library Functions

I am attempting to reverse-engineer an old DOS executable, which seems to have been compiled around 1992 using Microsoft's C compiler at the time. When opening the executable in Ghidra no imports are ...
jttri777's user avatar
  • 165
0 votes
1 answer
87 views

ELF - Why does objdump provide a wrong byte value in the .got?

I seriously can't tell if I'm misunderstanding something grossly or if this is a bug in objdump. Newbie alert. $ objdump -s --start-address=0x3fc0 --stop-address=0x3fc1 test test: file format ...
chilliefiber's user avatar
0 votes
1 answer
85 views

Create exe that jumps directly into main()-function from C

I am using x64dbg to explore image files on Windows. After the computer finishes prowling ntdll.dll it jumps to OptionalHeader.AddressOfEntryPoint. But this is not my main()-function. What is this ...
AirToTec's user avatar
2 votes
0 answers
270 views

Help Needed With Finding Image Data In DOS Game File

I have been analysing, an File called FW190AS.PAC from a 16 Bit Game called Secret Weapons Of The Luftwaffe, in a Hex Editor, the Bytes are displayed in Little Endian format. My aim with this game, is ...
Edward Winch's user avatar
1 vote
0 answers
104 views

Reversing Assembly to C

I've read the open letter addressing students asking for help with their homework and I agree with it, therefore I will try to be less of a pain in the *** ;) I need to reverse the x86-64 (AT&T) ...
mikealexx's user avatar
1 vote
0 answers
51 views

Fuzzing closed application

I want to get from you some advice about fuzzing. I am checking a huge C application (not open source) which is also an HTTP server. My purpose is to fuzz the HTTP server via the requests being sent ...
flapz18716's user avatar
3 votes
1 answer
451 views

How to bypass anti debugger? IDA Pro

Im new to reverse engineering and doing a crackme that requires me to make a keygen, yes i know making a keygen isn't a beginner task however im stuborn, i am trying to debug the program to understand ...
alias's user avatar
  • 31
1 vote
1 answer
104 views

What is the output for this and how?

*(_BYTE *)(Key + Integer_count - 1) + 79 Here : Key = 0x22EC278 (dw 'Âx') or Stack[000015B8]:0019FC2C db 78h ; x Stack[000015B8]:0019FC2D db 0C2h ; Â Stack[000015B8]:0019FC2E db 2Eh ; . Stack[...
Satyam Singh's user avatar
1 vote
1 answer
167 views

Why this x64 shellcode doesn't work?(segmentation fault)

I found a simple shellcode on the internet. Then, to test this shellcode, I make the simple ret overwrite code. test.c #include <stdio.h> #include <string.h> char buf[100]; int main(void)...
doldom's user avatar
  • 55
3 votes
1 answer
113 views

Linux Kernel for embedded platform - Available Sources but no configuration

I am trying to recompile the kernel for the Redmi Note 4 (MTK). I have successfully obtained a copy of the stock, pre-compiled kernel, and a variant of sources that seems to coincide quite well with ...
KiralyCraft's user avatar
2 votes
0 answers
120 views

Does AnyOne knows how to reverse python file that is encoded into elf binary .cpython-310.so extension? Please Help me Out

Following is the link to the file that I want to reverse. This is the python file that is encoded in cpython or cython and it is now a binary file. Please help me to decode it as it is very important ...
Jameel Safdar's user avatar
5 votes
1 answer
131 views

Check if libc.so use tcache

I have ARM libc.so (GLIBC), How can I check if that libc.so used tcache, and what is the value of arena_max? Can I check that information offline?
Kokomelom's user avatar
  • 181
4 votes
2 answers
122 views

Reversing rodata

I'm playing with an ELF binary to learn IDA, and I'm not sure how to interpret what I'm seeing.. A function calls this: v1 = MList[2 * result]; When I look at MList, it looks like this: public MList ...
XeroxDucati's user avatar
1 vote
0 answers
89 views

Binary Exploitation

I am trying to learn binary exploitation. I can modify the binary behaviour with gdb, but I have not understood how to exploit the binary in C. I've found some references on "Hacking - the art of ...
LianoQ's user avatar
  • 31
1 vote
1 answer
83 views

What was the original math operation after optimizing compiler?

I'm pretty sure that original code was much simpler: (((x + 16) >> 31) ^ abs(x + 16) & 3) + 4 * ((y + 16) % 4) - ((x + 16) >> 31) Looks like division with remainder... Any ideas what ...
mastermind's user avatar
2 votes
0 answers
85 views

How to do a Mifare Classic Replay attack

I'm learning for the university and have to do a Mifare Classic replay attack. I don't really know how to do that and hope some of you can help me at least a bit. The goal is to get the number of ...
user avatar
2 votes
1 answer
74 views

How to interpret this __ctype_b based predicate?

I am getting this simplified function from the decomplication results of Ghidra, and I am having a hard time interpreting what the predicate would evaluate to since I do not have access to __ctype_b ...
Anis LOUNIS aka AnixPasBesoin's user avatar
3 votes
0 answers
41 views

Data placement in memory

I am playing with buffer overflow attacks in C. I have the following code: int foo(void*, void*); // Calculates the distance (in bytes) between two addresses in memory int main(int argc, char**...
Stone Paul's user avatar
3 votes
0 answers
269 views

How would I crack a software that has Xor encryption

So, before you shout at me to go on google I would just like to say I am new to reverse Engineering. Like I have been doing it for a hour. So, I was doing a bunch of crackmes.one using the search all ...
user42257's user avatar
1 vote
0 answers
337 views

ZTE F680L V6.0 GPON firmware extraction JFFS2 decrypt AES key

Hi guys i have unpacked the firmware ZTE F680L v6.0 with binwalk -Me and have extracted the jffs2 You can find the firmware image here. Inside we have an /etc folder with some db_default_cfg.xml which ...
0p3nS0urc3 2015's user avatar
1 vote
0 answers
1k views

How can i get the address of a function in memory?

I am currently completing a CTF exercise where i must attempt to overwrite a function pointer on the stack through a buffer overflow here is the code: #include <err.h> #include <stdio.h> #...
professional pro's user avatar
2 votes
1 answer
1k views

How do I Decompile .Pyd file made with python, cython and pyinstaller 3.6

I created an app in 2018 with python and then used Cython and pyinstaller v 3.6. I am wondering how to decompile it. I have tried uncompyle6 + pyinstxtractor however this only works for python files,...
Cave Johnson123's user avatar
0 votes
1 answer
518 views

PE FILE section read in C

I need to read PE file. I need to search word in PE file. Search is required to cover only the sections with the “executable” flag. And I need to specify the section where the word found. How can I do ...
sadMarry's user avatar
2 votes
0 answers
269 views

Finding the main function on Windows compiled executables

For a C/C++ program compiled on Windows using the x86 architecture, what is the best way to find the main function within disassembled code without relying on signatures such as FLIRT? I've found ...
Soyboii's user avatar
  • 41
1 vote
0 answers
58 views

Is there any available source code which is Windows 64 bit compatible that can disassemble binary code?

I'm writing a program that takes as input a single byte of binary (machine code from code segment) and converts it into assembly. I've done some searching online but have yet to find anything helpful. ...
vSm's user avatar
  • 11
1 vote
0 answers
44 views

Where can I get source code for ASCII graph parser?

My plan is to see source code graph in vim of doxygen. I almost use TUI on Linux. So, Where can I get C, Python based source code for ASCII graph parser?
user3881835's user avatar
1 vote
1 answer
180 views

Python or C for a Qt application and security against reverse engineering

I actually have two choices : C or Python to create my application. On my application users will need a key (on start) to access it, the key will be verified with an algorythm on the user's computer. ...
sramazoth's user avatar
  • 113
2 votes
0 answers
164 views

What hints can x86 disassembly give as to GCC/G++ compiler version and options?

I've taken an interest to disassembling binaries and attempting to recreate 1:1 source code (logic) in C and C++ compiled with GCC. I say "logic" because this question does not pertain to ...
Matthew Tingum's user avatar
1 vote
1 answer
118 views

C instruction causing an address shift

I am trying to recreate a segment of assembly back into the C code. Below is the progress I've made so far, but I'm getting stumped on a specific section. 00000000000010049 <mysteryFunc>: ...
enkrypted87's user avatar
1 vote
1 answer
218 views

Why is Visual Studio compiling my EXE file with an entry point that is not in the file?

So I am trying to open my test app EXE file in ollydbg to study the assembly, the stack, registers and all that stuff for educational purposes and it gives me this message saying that the entry point ...
EmexNatera's user avatar
0 votes
1 answer
103 views

Crackmes challenge not validating all answers

I am playing with this crackme. The executable takes a numerical input (e.g., 123) and adds all the numbers. The total must be 50. However, I noticed that not all inputs adding up to 50 are validated. ...
Ronald Rivera's user avatar
1 vote
1 answer
266 views

Custom IDA Decompilation Coloring

Is there a way to customize the coloring of IDA's decompiled code? IDA -> Options -> Colors -> Syntax doesn't seem to affect the coloring of decompilation.
j__'s user avatar
  • 113
2 votes
2 answers
2k views

Understanding a C code including CRT functions, decompiled with Ghidra

I am trying to learn software reverse engineering with Ghidra, though I have never used Visual Studio Compilers or the C runtime (CRT). I have a piece of decompiled C code: <typeName> <...
Foad's user avatar
  • 189
1 vote
2 answers
1k views

Is it possible/feasible to decompile a program written in C++ to C?

I've not seen a lot of material on this. I've seen people attempting to bring a C++ program back to C++ code, and claiming how hard it is, but C code from C++ program? I don't know. If it is possible, ...
Luke Dunn's user avatar
0 votes
2 answers
399 views

Reversing an obfuscation through a long linear switch statement

I have a program (ELF, 32 bits) that is probably quite short and simple, but which have been obfuscated with the following construction: i = 0 switch(i): case 0: one small instruction ...
Katoptriss's user avatar
1 vote
1 answer
2k views

How to define "code" variable type in Ghidra

Of all the confusing parts of Ghidra, I'd like to ask about the "code" keyword. A similar question was asked here. However, I am not asking what the keyword is, but how to interpret/define ...
Luke Dunn's user avatar
0 votes
0 answers
195 views

What is this CRC32 algorithm (written in C), and how can it be written in Java or Python?

I've been trying to convert this CRC32 algorithm to Java or Python, but I haven't been successful, I believe it's because I'm not familiar enough with c. Note that I believe DAT_804818d0 is the seed, ...
Gamebuster19901's user avatar
1 vote
2 answers
1k views

is there a tool to decompile old exe to C?

I follow the free software implementation of OpenRCT2 from the beggining (when it was in other repository). And the first commits are a bunch of C files, these files has a lot of asm blocks of code ...
tres.14159's user avatar
1 vote
0 answers
39 views

Make avaible x64 C++ exceptions on manually mapped module

I am trying to bind Lua on manually mapped module. As you can see clearly on here. They are using C++ or C exceptions on their API and there is no way to avoid them. I wonder to know if there are ...
aya's user avatar
  • 11
0 votes
2 answers
89 views

Understanding Loop Statements: For & While [closed]

Background Hello! New user. I am working on a personal computer science project that involves research on loop statements such as the for and while loops in C - these loops can apply to other ...
Maestro's user avatar
  • 103
1 vote
0 answers
552 views

What is happening with this *param_1?

I am a bit of a starter, so bear with me as I can't find the answer through Google (a common thing in Ghidra work I noticed so far). I have a function that seems to read like it is a Constructor. But ...
Smileynator's user avatar
2 votes
1 answer
110 views

Useless instructions in a compiled getter

This is the second time I see this kind of function today : .text:00000000000010B0 sub_10B0 proc near ; CODE XREF: sub_1120:loc_1143↓p .text:00000000000010B0 lea ...
Max Buridant's user avatar
3 votes
1 answer
781 views

Is there a way to name a flag for a bit field in Ghidra?

In a line like this: if ((my_variable & 0x80000000) == 0) { Is there a way to label 0x80000000 as e.g. FLAG_HAS_PROPERTY_GREEN, or would I have to rely on comments for that?
Anna's user avatar
  • 165
0 votes
1 answer
79 views

Does psVar[-6] refer to 6*sizeof(psVar) bytes before psVar? Can you avoid the negative index?

In this decompiled code, does psVar8[-6] refer to 6*sizeof(psVar8) == 12 bytes before psVar8? psVar8 = (short *)(&DAT_1412345b4 + named_index * 0x20); do { if (psVar8[-6] == 0) break; // ... } ...
Anna's user avatar
  • 165
0 votes
1 answer
563 views

Translate ASM code x86 32 bits in C

I have a exercise which i can't resolve it, and i need help. If anyone can help me it would be great. I have the next ASM code in x86 32 bits which i need to translate in C language: Dump of assembler ...
FAN's user avatar
  • 1
0 votes
0 answers
221 views

How do I view registers at a specific point of a binary's execution?

I have a binary that I'm attempting to reverse engineer to find a flag. From using ghidra I have found that the flag is stored in the program at a point called "check" and then run through ...
Jacob Pradels's user avatar
0 votes
1 answer
329 views

ret2libc: problem getting exploit work without pwntools

I am trying to exploit this program test with ret2libc. Only NX is enabled. #include <stdio.h> void vuln() { char buffer[256]; gets(buffer); } int main() { vuln(); return 0; } ...
Mr Krisey's user avatar
2 votes
0 answers
341 views

How to hack fan control speed?

So I recently bought a new laptop (Acer Aspire A315-57g) on which I found that the cooling solution wasn't optimal, and I decided that I want more RPMs from my fan. However, I wasn't able to find a ...
rec's user avatar
  • 455
1 vote
0 answers
177 views

Confusing objdump with data as code

I am trying to confuse objdump to solve the first exercise of chapter 6 in Practical Binary Analysis. Admittedly I am super weak with inline assembler but I made a best-effort attempt and tried to get ...
CL40's user avatar
  • 111
0 votes
1 answer
76 views

string pointer to byte conversion condition

I am trying to understand the following snippet. I understand that the first check would check if it is even if it would be an int, but I don't understand it in this context. Could someone explain to ...
David's user avatar
  • 3

1
2 3 4 5
7