duangsues.is_a? SaltedFish
60 subscribers
609 photos
6 videos
91 files
562 links
🌶🐔🐟 duangsuse 的日常
尤其喜欢发些奇奇怪怪的东西
和转载别人的东西
Download Telegram
但之前的一次测试中扮演了一次男声的角色,不过感觉还是女声拉低的(
dse@susepc:~/catok/retdec/build$ make install
[ 0%] Built target capstone-project
[ 1%] Built target jsoncpp-project
[ 2%] Built target llvm-project
[ 3%] Built target rapidjson-project
[ 4%] Built target tinyxml2-project
[ 5%] Built target elfio-project
[ 6%] Built target libdwarf-project
[ 7%] Built target pelib-project
[ 8%] Built target yaracpp-project
[ 9%] Built target yaramod-project
[ 10%] Built target whereami
[ 11%] Built target retdec-utils
[ 11%] Built target retdec-ar-extractor
[ 12%] Built target retdec-ar-extractortool
[ 13%] Built target retdec-capstone2llvmir
[ 15%] Built target retdec-config
[ 15%] Built target retdec-crypto
[ 19%] Built target retdec-ctypes
[ 19%] Built target retdec-ctypesparser
[ 20%] Built target retdec-demangler
[ 28%] Built target retdec-fileformat
[ 29%] Built target retdec-dwarfparser
[ 29%] Built target retdec-pdbparser
[ 30%] Built target retdec-debugformat
[ 30%] Built target retdec-llvm-support
[ 32%] Built target retdec-loader
[ 33%] Built target retdec-rtti-finder
[ 33%] Built target retdec-stacofin
[ 42%] Built target retdec-bin2llvmir
[ 43%] Built target retdec-bin2llvmirtool
[ 44%] Built target retdec-patterngen
[ 44%] Built target retdec-bin2pat
[ 45%] Built target retdec-configtool
[ 47%] Built target retdec-cpdetect
[ 58%] Built target retdec-fileinfo
[ 59%] Built target retdec-idr2pat
[ 95%] Built target retdec-llvmir2hll
[ 95%] Built target retdec-llvmir2hlltool
[ 95%] Built target retdec-macho-extractor
[ 95%] Built target retdec-macho-extractortool
[ 96%] Built target retdec-pat2yara
[ 96%] Built target retdec-stacofintool
[ 97%] Built target retdec-unpacker
[ 97%] Built target retdec-unpacker-mpress
[ 98%] Built target retdec-unpacker-upx
[ 99%] Built target retdec-unpackertool
[100%] Built target retdec-unpacker-example
[100%] Built target retdec-getsig
Install the project...
-- Install configuration: "Release"
Downloading archive from https://github.com/avast-tl/retdec-support/releases/download/2018-02-08/retdec-support_2018-02-08.tar.xz ...
retdec 看感觉反编译结果特别好看,几乎都能直接拿去重新编译了
This media is not supported in your browser
VIEW IN TELEGRAM
基于 LLVM
能想像吗... 基于 LLVM IR
正在把输出重定向至 “wget-log”。
Verfifying archive's checksum ...
Unpacking archive ...

下好了 🌚

RetDec support directory downloaded OK
-- Installing: /home/dse/rd/lib
-- Installing: /home/dse/rd/lib/libretdec-libdwarf.so
-- Installing: /home/dse/rd/lib/libretdec-libelf.so
compiling yara signatures...
signatures compiled successfully
-- Installing: /home/dse/rd/bin/retdec-color-c.py
-- Installing: /home/dse/rd/bin/retdec-config.sh
-- Installing: /home/dse/rd/bin/retdec-archive-decompiler.sh
-- Installing: /home/dse/rd/bin/retdec-decompiler.sh
-- Installing: /home/dse/rd/bin/retdec-fileinfo.sh
-- Installing: /home/dse/rd/bin/retdec-signature-from-library-creator.sh
-- Installing: /home/dse/rd/bin/retdec-unpacker.sh
-- Installing: /home/dse/rd/bin/retdec-utils.sh
-- Installing: /home/dse/rd/bin/retdec-ar-extractor
-- Set runtime path of "/home/dse/rd/bin/retdec-ar-extractor" to "$ORIGIN/../lib"
-- Installing: /home/dse/rd/bin/retdec-bin2llvmir
-- Set runtime path of "/home/dse/rd/bin/retdec-bin2llvmir" to "$ORIGIN/../lib"
-- Installing: /home/dse/rd/bin/retdec-bin2pat
-- Set runtime path of "/home/dse/rd/bin/retdec-bin2pat" to "$ORIGIN/../lib"
-- Installing: /home/dse/rd/bin/retdec-config
-- Set runtime path of "/home/dse/rd/bin/retdec-config" to "$ORIGIN/../lib"
-- Installing: /home/dse/rd/bin/retdec-fileinfo
-- Set runtime path of "/home/dse/rd/bin/retdec-fileinfo" to "$ORIGIN/../lib"
-- Installing: /home/dse/rd/bin/retdec-idr2pat
-- Set runtime path of "/home/dse/rd/bin/retdec-idr2pat" to "$ORIGIN/../lib"
-- Installing: /home/dse/rd/bin/retdec-llvmir2hll
-- Set runtime path of "/home/dse/rd/bin/retdec-llvmir2hll" to "$ORIGIN/../lib"
-- Installing: /home/dse/rd/bin/retdec-macho-extractor
-- Set runtime path of "/home/dse/rd/bin/retdec-macho-extractor" to "$ORIGIN/../lib"
-- Installing: /home/dse/rd/bin/retdec-pat2yara
-- Set runtime path of "/home/dse/rd/bin/retdec-pat2yara" to "$ORIGIN/../lib"
-- Installing: /home/dse/rd/bin/retdec-stacofin
-- Set runtime path of "/home/dse/rd/bin/retdec-stacofin" to "$ORIGIN/../lib"
-- Installing: /home/dse/rd/bin/retdec-unpacker
-- Set runtime path of "/home/dse/rd/bin/retdec-unpacker" to "$ORIGIN/../lib"
-- Installing: /home/dse/rd/bin/retdec-getsig
-- Set runtime path of "/home/dse/rd/bin/retdec-getsig" to "$ORIGIN/../lib"

[1]+ 已完成 make install
##### Gathering file information...
RUN: /home/dse/rd/bin/retdec-fileinfo -c /home/dse/liba.so.c.json --similarity /home/dse/liba.so --no-hashes=all --crypto /home/dse/rd/bin/../share/retdec/support/generic/yara_patterns/signsrch/signsrch.yara --max-memory-half-ram
Input file : /home/dse/liba.so
File format : ELF
File class : 32-bit
File type : DLL
Architecture : x86 (or later and compatible)
Endianness : Little endian
Detected tool : gold (1.11) (linker), .note section heuristic
Detected tool : GCC (4.8) (compiler), .comment section heuristic
Detected tool : GCC (4.9) (compiler), .comment section heuristic
Original language : C++

真好用
这次就到这里了(
想给 Lite 写个 LV(Lite VM)
或者给 Java 创建 bc 的绑定(binding)
或者 Wren...
不过 reveng 方便的话就算了
This media is not supported in your browser
VIEW IN TELEGRAM
看了某宝上的 GBA 就没兴趣了(内存算
接下来总结 Lite 的功能,准备写 LV 🌚
- LV 要成为 stack-based machine
- LV 要拥有一个 call-stack 和一个 stack 和一个 global table,gtable 必须是线程安全的
- LV 使用词法作用域和 lazy-init 优化(不是替换绑定)
- LV 要能支持 block
- LV 要能实现 Lite 的所有功能
- LV 要支持这些字面量:
- true / false
- null
- number ( byte, short, int, long, float, double, BigInteger, BigDecimal )
- string / char
- symbol
- range

- 要能创建一定维度的数组
- [] 能索引 数组、Map、List、Object(getXXXX property or field)、subclass、static member
- []= 能新建索引 数组、Map、List、Object(setXXXX property or field)、static member
- :: 是快速版本的 [] (语法糖),在虚拟机层面上不存在的
- -> 能修改 数组、Map、List、Object(setXXXX property or field)、static member(语法糖)

- 块内 return、break、next


- LV 要支持行注释: ;

- LV 要能进行动态链接
- LV 要支持调试信息 (文件名、行号)

- LV 暂时只使用代码文本表示
- LV 支持指令插件

- Lite 支持这些东西:
- vararg(在虚拟机层面不存在)
- block
- while、if、for、def、call、assign、
- | or in & and < > <= >= != == !== === << to + - * / % ** :: as
- unary - ! ++ —
-
- 要能调用对象的方法
- 要能调用类方法
- 要能调用 Lite 方法
- 要能调用 constructor
- 能创建 proc
指令列表:
- nop 啥都不做
- push [object] 往栈上放置一个对象
- pushnull 放置 null
- pushtrue 放置 true
- pushfalse 放置 false
- pushlv 往栈上放置虚拟机引用
- scope 进入作用域
- leave 离开作用域
- sget 读取本地变量
- sput 设置本地变量
- fun [sym] 定义函数符号
- call [sym] 调用函数
- ret 返回
- jump [ip] 跳转到 ip 处执行
- branchif [ip] if
- branchunless [ip] unless
- get 读取全局变量
- put 设置全局变量

- newary [n] 创建 n 维度的数组
- index []
- newindex []=
- file [fname] 在文件中
- line [line] 在行中

- send 调用对象方法和类方法
- new 创建对象

- block [range] 创建块对象,它打包所有引用到的本地变量的绑定
- yield 调用块对象

- or
- in?
- and
- op<
- op>
- op<=
- op>=
- noteq
- eq
- fulleq
- shl
- newrange
- add
- sub
- mul
- div
- mod
- pwr
- cast
- not
- inc
- dec

- len