BuringStraw

BuringStraw

今天和一道題玩了捉迷藏(xxxorrr)

當你在 main 中找不到程式邏輯的時候,如何考慮?

  1. 有沒有註冊異常處理程式。還有像__cxa_atexit這樣退出時執行的函數。

  2. __lib_start_main的參數中有用於初始化的函數。順便貼一下它的定義:

    int __libc_start_main(
    	int (*main) (int, char * *, char * *), 
    	int argc, 
    	char * * ubp_av, 
    	void (*init) (void), 
    	void (*fini) (void), 
    	void (*rtld_fini) (void), 
    	void (* stack_end)
    );
    

    • performing any necessary security checks if the effective user ID is
    not the same as the real user ID.
    • initialize the threading subsystem.
    • registering the rtld_fini to release resources when this dynamic shared object exits (or is unloaded).
    • registering the fini handler to run at program exit.
    • calling the initializer function (*init)().
    • calling main() with appropriate arguments.
    • calling exit() with the return value from main().

  3. 通過字串或位元組陣列的交叉引用,可以找出隱藏的操作。

所以當你遇到了靈異事件的時候,不要驚慌,不然連個難度 1 的題的隱藏操作都找不出來。

載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。