Questions tagged [deobfuscation]

Figuring out how a program works when that program has been deliberately made difficult to understand

Deobfuscation is the reverse process of . It means figuring out how a program works when that program has been deliberately made difficult to understand.

Deobfuscation is related to . If the question is about reverse engineering rather than programming then posting on the Reverse Engineering site should be considered instead.

Do not use this tag merely to indicate that you don't understand how a program works: use it only when the program was made obfuscated on purpose.

External links

392 questions
997
votes
4 answers

Obfuscated C Code Contest 2006. Please explain sykes2.c

How does this C program work? main(_){_^448&&main(-~_);putchar(--_%64?32|-~7[__TIME__-_/8%8][">'txiZ^(~z?"-48]>>";;;====~$::199"[_*2&8|_/64]/(_&2?1:8)%8&1:10);} It compiles as it is (tested on gcc 4.6.3). It prints the time when compiled. On my…
corny
  • 7,824
  • 3
  • 14
  • 20
390
votes
9 answers

Concept behind these four lines of tricky C code

Why does this code give the output C++Sucks? What is the concept behind it? #include double m[] = {7709179928849219.0, 771}; int main() { m[1]--?m[0]*=2,main():printf((char*)m); } Test it here.
codeslayer1
  • 3,666
  • 3
  • 17
  • 13
112
votes
23 answers

Firebase Crashlytics: Upload missing dSYMs to see crashes from 1 versions.(iOS)

Error Message: Upload missing dSYMs to see crashes from 1 versions. Versions affected: 1.0 (1) I am trying to implement Firebase Crashlytics in my iOS project. I did all the setups according to Firebase Crashlytics Doucmentation. The crash is…
jazzbpn
  • 6,441
  • 16
  • 63
  • 99
66
votes
3 answers

How does this magic JavaScript code work?

This is a small piece of JavaScript code that alerts "Hello…
Tony Dinh
  • 6,668
  • 5
  • 39
  • 58
55
votes
1 answer

How to properly deobfusacte a Perl script?

I'm trying to deobfuscate the following Perl code (source): #!/usr/bin/perl (my$d=q[AA GTCAGTTCCT CGCTATGTA ACACACACCA TTTGTGAGT ATGTAACATA CTCGCTGGC TATGTCAGAC AGATTGATC…
BioGeek
  • 21,897
  • 23
  • 83
  • 145
37
votes
8 answers

How to get rid of eval-base64_decode like PHP virus files?

My site (very large community website) was recently infected with a virus. Every index.php file was changed so that the opening php tag of these files it was changed to the following line:
fractalbit
  • 963
  • 2
  • 12
  • 17
33
votes
5 answers

De-obfuscate Javascript code to make it readable again

I hate to bring this here, while doing the learning of obfuscating the JS code, I encoded my code and then over wrote the orginal one without any backup :) Following is my obfuscated code. var…
FaisalKhan
  • 2,406
  • 3
  • 25
  • 32
27
votes
3 answers

How to deobfuscate an Android stacktrace using mapping file

I got a stacktrace from the crashreporting system and it is obfuscated, like ... Failed resolution of: Lru/test/c/b/a; ... I have a mapping file. How to deobfuscate this stacktrace using mapping.txt?
Maksim Turaev
  • 4,115
  • 1
  • 29
  • 42
22
votes
2 answers

Why use 'function address == NULL' instead of 'false'?

Browsing among some legacy code I've found such function: static inline bool EmptyFunc() { return (void*) EmptyFunc == NULL; } What are the differences from this one: static inline bool EmptyFunc() { return false; } This code was created…
18
votes
2 answers

Understanding an uncommon argument to main

The following question was given in a college programming contest. We were asked to guess the output and/or explain its working. Needless to say, none of us succeeded. main(_){write(read(0,&_,1)&&main());} Some short Googling led me to this exact…
RaunakS
  • 508
  • 1
  • 10
  • 20
17
votes
1 answer

difference between uglify and obfuscate? Is one more safe?

Recently I was asked to obfuscate my javascript in order to hide a client's api key. I'm using grunt. Will grunt-contrib-uglify obfuscate my js? What's the difference between uglify and obfuscate? Is one much more safe than the other?
Connor Leech
  • 18,052
  • 30
  • 105
  • 150
16
votes
1 answer

Simple hiding/obfuscation of strings in APK?

Sometimes you need to store a password in the app itself, such as a username/password for communicating with your own server. In these cases it's not possible to follow the normal process of storing passwords - i.e. hash the password, store the…
Magnus
  • 17,157
  • 19
  • 104
  • 189
16
votes
2 answers

What does "for x in y or z:" do in Python?

I'm trying to take apart and de-obfuscate this mandlebrot-generating python code: _ = ( 255, lambda V…
Nick Sweeting
  • 5,364
  • 5
  • 27
  • 37
15
votes
2 answers

How does this obfuscated javascript code work?

I came across a cryptic jQuery and am interested to understand how it works. http://jsfiddle.net/fsW6U/ Also check the code below: $ = ~ []; $ = { ___: ++$, $$$$: (![] + "")[$], __$: ++$, $_$_: (![] + "")[$], _$_: ++$, $_$$:…
vkapadia
  • 235
  • 2
  • 6
13
votes
1 answer

What does this strange line do?

A pull request has been done with a new test for the Rust compiler. It verifies that a strange line can compile: fn main() { let val = !((|(..):(_,_),__@_|__)((&*"\\",'@')/**/,{})=={&[..=..][..];})// ; assert!(!val); } What does this…
Boiethios
  • 38,438
  • 19
  • 134
  • 183
1
2 3
26 27