My key takeaways
-
Go basics:
-
local functions start with small letter, exported functions start with a capital letter
-
walrus operator = declare and initialize in one statement like
k := 3 -
the only loop is a
forloop -
Go is truly a compiled language, it produces a machine native executable
-
-
Shellcode:
-
machine code native to architecture of target system
-
often first stage payload
-
msfvenomis a rich source of various shellcode
-
-
3 steps for shellcode in Windows
-
allocate memory marked as exec
-
copy shellcode into allocated memory
-
create a thread that points to the starting address of memory or directly execute if possible
-
-
PAGE_EXECUTE_READWRITEas mem alloc is an instant hit for good EDR/AV- to avoid EDR detection, copy shellcode to
R/Wthen switch toPAGE_EXECUTE_READ
- to avoid EDR detection, copy shellcode to
-
On a win dev system use
dumpbinto validate created dll’s -
Defender and blue teams: back to living of the land runDLL inspection eg for network traffic
Env
-
Provided by BHIS
-
Presenter: Joff Thyer