[dreamhack] captain-hook writeup

https://dreamhack.io/wargame/challenges/51 import frida import sys def on_message(message, data): print(message) # JavaScript code to be injected jscode = “”” var file = new File(“dump.txt”, “a”) //hook GdipSetSmoothingMode, add counter and print out counter each when it get called var counter = 0; const base = Module.findBaseAddress(‘CaptainHook.exe’) Interceptor.attach(Module.findExportByName(null, “GdipSetSmoothingMode”), { onEnter: function(args) { counter++; //console.log(“GdipSetSmoothingMode called: “.