Notes

Do not read codes but patch binary.

Entries from 2019-01-01 to 1 year

Three chains for writing a linker

This is for organising my knowledge to create a simple linker of PE. Linker is a bit hard target for being written from scratch without being considered its abstraction to me. What a linker will do is roughly, having one or multiple object…

simple build command

https://github.com/Hiroshi123/bin_tools/blob/master/src/tools/build.c 暇だったので書いてみた。 makefile風のfileとtargetを指定して実行する. windowsでのみbuildできる。 元々,windows向けのld書こうと思ってたんだけど,次いでに作ってみた。 やって…

Dig into LdrInitializeThunk

On my previous post, I posted piece of code which ought to work out for a dll injection on the stage where kernel32.dll has not been mapped yet. It looked worked out apparently, in fact it missed a point. The point is kernel32.dll will be …

DLL injection with just ntdll

If you want to step back to the days before the high level languages had been prevailed, nevertheless still want to write somehow practical in a sense in this era, writing a piece of injection code is a good target. Windows supports functi…

x86-64 emulatorを作っていて思ったこと

平成最後の日ということで、てきとーに何か書き残しておく。 マルウェア解析をしていると、マルウェアがマシンを破壊してもよいように、動的解析では仮想環境を使うが、それも面倒な時がある。 その為、自作x86エミュレータを暇な時にせっせと作っていたのだ…

objtestについて

3月からお仕事でmalware解析やるので、役立ちそうなbinary解析ツールを作っている。 その中で、objtestというコマンドが割と自分の中でいいものができたなっという気がするので、 簡単に紹介。 qemuやllvmなど、大きなプロジェクトのソースを読む場合って、…

call graph生成toolについて

年明けてから、ふとした思い付きで、call graph生成ツール(https://github.com/Hiroshi123/bin_tools)を作っている。 目的としては、windowsとmacのsourceのないdllを効率良く理解することを目的としている。 現状はelf向けのもの(中途)のみできてる。 で、…

Simple overwriting of GOT

GOT overwriting is a good starting point for making sense of what is all about "relocation". Relocation can be done in two phases; statically or dynamically. Here, I will mention about dynamic relocation. When you call a function whatever …