Skip to content
/ lain Public

Lain - Interactive decombiler.

Notifications You must be signed in to change notification settings

X-Vector/lain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

lain

Lain - Interactive Decombiler.

8a10f08a07fc97b392249973c5d184dca437c909_hq

dependencies

  • radare2 [r2pipe]
  • retdec
  • pygments

Main features

info functions || i f

[#] i f

0x080482f8  sym._init
0x08048320  sym.imp.__libc_start_main
0x08048330  sym.imp.scanf
0x08048340  sym.imp.printf
0x08048350  sym.imp.strcmp
0x08048360  entry0
0x08048384  fcn.08048384
0x080483b0  sym.__do_global_dtors_aux
0x080483e0  sym.frame_dummy
0x08048414  main
0x080484a0  sym.__libc_csu_init
0x08048510  sym.__libc_csu_fini
0x08048515  sym.__i686.get_pc_thunk.bx

info strings || i s

[#] i s

0x08048568   IOLI Crackme Level 0x00\n
0x08048581   Password: 
0x0804858f   250382
0x08048596   Invalid Password!\n
0x080485a9   Password OK --\n

decompile <function> || d <function>

[#] d main
┌ 
│ def main(argc, argv):
│     printf("IOLI Crackme Level 0x00\n")
│     printf("Password: ")
│     loc_3 = &loc_4scanf("%s", loc_3)
│     if strcmp(loc_3, "250382") == 0:
│         printf("Password OK --\n")
│     else:
│         printf("Invalid Password!\n")
│     return 0

? <value>

[#] ? 0x2345

│ hex     0x2345
│ octal   021505
│ unit    8.8K
│ segment 0000:0345
│ int32   9029
│ string  "E#"
│ binary  0b0010001101000101
│ fvalue: 9029.0
 float:  0.000000f
│ double: 0.000000
│ trits   0t110101102

rename <var> || r <var>

rename globals <new_global_variables_name> || r globals <...> # Default is glob

rename locals <new_local_variables_name> || r local <...> # Default is loc

[#] r sub.strlen_616 test
[#] r loc_5 input
[#] r locals local_var
[#] d main
┌ 
│ def main(a1):
│     local_var_2 = 0fcn.08048766(0)
│     local_var_3 = local_var_2 + 0x18f7 ebxprintf(local_var_2 + 364)
│     printf(local_var_3 - 0x1772)
│     local_var_5 = &local_var_6scanf(local_var_3 - 0x1767, local_var_5)
│     test(local_var_5)
│     return 0

TODO

  • fix retdec missing function names
  • fix retdec missing function arguments
  • add rename
  • add syntax highlighting
  • fix more bugs
  • save to project
  • merege code with assembly
  • create installer script
  • design a GDB-Peda like pseudo source code debugging interface

EOF

About

Lain - Interactive decombiler.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages