Havoc

Documentation

Agent

Havoc default agent which is called the Demon agent has a lot of builtin features and it's malleable and modular by design.

About Evasion

You might ask if the Demon agent bypasses anti-virus (AV) products or even endpoint detection and response (EDR) products, most likely not. The Demon agent wasn't designed to be evasive nor was it within the scope. It was designed to be as malleable and modular as possible to give the operator as much power over it to adapt it for the red team operation without overloading it with evasion techniques and features that are going to be most likely burned and going to be an IOC by itself. And the devs of the agent don't wanna play the cat and mouse game with AV & EDR vendors. That said, the Demon agent is designed to be interoperable with common techniques for bypassing anti-virus software such as loaders, packers, crypters, and stagers.

Demon Features & Configuration

The Demon agent has a lot of features that can be used and configured.

In the payload generation window (Attack -> Payload) you can configure your Demon payload. HavocPayloadWindow

ConfiguarationDescription
SleepSleep delay between each callback
Indirect SyscallUse of indirect syscalls
Sleep TechniqueSleep obfuscation technique.

For the sleep obfuscation technique, 3 options can be used.

  • Foliage is a sleep obfuscation technique that creates a new thread and uses NtApcQueueThread to queue an ROP chain that encrypts our agent memory and delays execution. (Author of this technique is Austin Hudson)
  • Ekko is a sleep obfuscation technique that uses RtlCreateTimer to queue up an ROP chain that encrypts our agent memory and delays execution. (Original Github repository)
  • WaitForSingleObjectEx is not a sleep obfuscation technique. It just delays the execution and doesn't perform any kind of sleep encryption.

 

Injection Configuration:

ConfiguarationDescription
AllocWhat technique to use when allocating memory.
ExecuteWhat technique to use when executing a pointer.
Spawn64x64 injection target for post exploitation modules
Spawn86x86 injection target for post exploitation modules

Native/Syscall is using NtAllocateVirtualMemory/NtCreateThreadEx either from Ntdll.dll or if Indirect Syscall has been checked it's going to build a stub that uses the syscall instruction from another native function (which in this case is NtAddBootEntry).

Win32 is normal windows API (VirtualAllocEx/CreateRemoteThread)

Demon Commands

The following commands are available to the.

CommandTypeDescription
helpCommandShows help message of specified command
sleepCommandsets the delay to sleep
checkinCommandrequest a checkin request
jobModulejob manager
taskModuletask manager
procModuleprocess enumeration and management
transferCommanddownload transfer module
dirCommandlist specified directory
downloadCommanddownloads a specified file
uploadCommanduploads a specified file
cdCommandchange to specified directory
cpCommandcopy file from one location to another
removeCommandremove file or directory
mkdirCommandcreate new directory
pwdCommandget current directory
catCommanddisplay content of the specified file
screenshotCommandtakes a screenshot
shellCommandexecutes cmd.exe commands and gets the output
powershellCommandexecutes powershell.exe commands and gets the output
inline-executeCommandexecutes an object file
shellcodeModuleshellcode injection techniques
dllModuledll spawn and injection modules
exitCommandcleanup and exit
tokenModuletoken manipulation and impersonation
dotnetModuleexecute and manage dotnet assemblies
netModulenetwork and host enumeration module
configModuleconfigure the behaviour of the demon session
pivotModulepivoting module
rportfwdModulereverse port forwarding
socksModulesocks4a proxy

The help command

Shows how to use the specified command.

Expected Arguments<command>

command

If a parameter is around a [] then it means it is required to specify the argument.

If a parameter is around a () then it means it is optional and can be left out.

The sleep command

Sets the sleep delay between each tasking routine and request. The delay should be specified in seconds.

Expected Arguments<delay>

command

The checkin command

Requests a checkin request and displays the metadata from the checkin request.

command

Still under work

This section is in work. It will be published soon.

Spiderman Work

On this page

  • Agent
  • About Evasion
  • Demon Features & Configuration
  • Demon Commands
  • The help command
  • The sleep command
  • The checkin command
  • Still under work