Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codespell across project #399

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
- Encrypt config in implant (AES or RC4? not sure)
- add RSA for AES key exchange to avoid exposing the AES key on init request. adding extra communication security.
- rewrite client backend. for now its single threaded which is not ideal. split it into 3 threads which handles different jobs. [reference](https://twitter.com/C5pider/status/1650926729299460096)
- instead of hardcoding the loaded module scripts into the client load scripst from a config file (json).
- instead of hardcoding the loaded module scripts into the client load scripts from a config file (json).

I have planned to add more features. if you have any feature requests let me know in my discord server (link in the readme.md) or in my twitter dms.
6 changes: 3 additions & 3 deletions WIKI.MD
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,15 @@ Here is a full list of arguments that can be passed to the teamserver:
| -------- | ---- | ----------- | ----- |
| `server` |`--profile` | The configuration profile to load at start | Teamserver profile path (`string`) |
| | `-v` / `--verbose` | Enable verbose output | |
| | `-d` / `--debug` | Enable debug ouput | |
| | `-d` / `--debug` | Enable debug output | |
| | `-h` / `--help` | Output server help | |
| | `--debug-dev` | Enables DEBUG output (see below for caveats) | |

#### Enabling DEBUG Output

> DEBUG output can be enabled by passing the `--debug-dev` flag to the Teamserver.

When this flag is set, the Teamserver's `builder` class adds the `-D DEBUG` flag to the `builder.compilerOptions.CFlags` array and removes the `-nostdlib` flag to enable output to be printed to the console. Demon agent payloads genereated from the Havoc client will print visible DEBUG text in the console window after execution. The stdlib will be linked into the payload for this to occur, increasing the payload size.
When this flag is set, the Teamserver's `builder` class adds the `-D DEBUG` flag to the `builder.compilerOptions.CFlags` array and removes the `-nostdlib` flag to enable output to be printed to the console. Demon agent payloads generated from the Havoc client will print visible DEBUG text in the console window after execution. The stdlib will be linked into the payload for this to occur, increasing the payload size.

### <a name="tprofiles"></a>Profiles

Expand Down Expand Up @@ -515,7 +515,7 @@ During sleep, x64 demons may implement [return address spoofing](https://www.unk

Demon implements a multi-threaded job management system that allows the operator to manage long-running tasks.

> OPSEC NOTE: Long-running jobs will PREVENT sleep obfuscation from occuring at the specified sleep interval due to the other threads running. Sleep obfuscation will only occur when there are no job threads in a running state.
> OPSEC NOTE: Long-running jobs will PREVENT sleep obfuscation from occurring at the specified sleep interval due to the other threads running. Sleep obfuscation will only occur when there are no job threads in a running state.

- `job list` - Lists all running jobs.
- `job suspend 1` - Suspends a job with the ID of 1
Expand Down
2 changes: 1 addition & 1 deletion client/Data/UIs/GateStagedDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</item>
<item>
<property name="text">
<string>Windoows Reflective DLL</string>
<string>Windows Reflective DLL</string>
</property>
</item>
</widget>
Expand Down
2 changes: 1 addition & 1 deletion client/Data/UIs/Havoc.ui
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ p, li { white-space: pre-wrap; }
</action>
</widget>
<resources>
<include location="../resources/recources.qrc"/>
<include location="../resources/resources.qrc"/>
</resources>
<connections/>
</ui>
2 changes: 1 addition & 1 deletion client/Data/UIs/SmallWidgets/SessionInfo.ui
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
</row>
<row>
<property name="text">
<string>MAC Adress</string>
<string>MAC Address</string>
</property>
</row>
<column>
Expand Down
2 changes: 1 addition & 1 deletion client/Data/UIs/about.ui
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
<resources>
<include location="../resources/recources.qrc"/>
<include location="../resources/resources.qrc"/>
</resources>
<connections/>
</ui>
4 changes: 2 additions & 2 deletions client/Source/Havoc/Demon/ConsoleInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ auto DemonCommands::DispatchCommand( bool Send, QString TaskID, const QString& c
}
if ( jitter > 100 )
{
CONSOLE_ERROR( "The jitter can't be larget than 100" );
CONSOLE_ERROR( "The jitter can't be larger than 100" );
return false;
}
TaskID = CONSOLE_INFO( "Tasked demon to sleep for " + InputCommands[ 1 ] + " seconds with " + jit + "% jitter" );
Expand Down Expand Up @@ -2691,4 +2691,4 @@ auto DemonCommands::PrintModuleCachedMessages( ) -> void

DemonConsole->DemonCommands->BufferedMessages.clear();
}
}
}
32 changes: 16 additions & 16 deletions client/Source/UserInterface/Widgets/SessionGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,15 @@ void Node::contextMenuEvent( QGraphicsSceneContextMenuEvent* event )
}
}

auto seperator = new QAction();
auto seperator2 = new QAction();
auto seperator3 = new QAction();
auto seperator4 = new QAction();
auto separator = new QAction();
auto separator2 = new QAction();
auto separator3 = new QAction();
auto separator4 = new QAction();

seperator->setSeparator( true );
seperator2->setSeparator( true );
seperator3->setSeparator( true );
seperator4->setSeparator( true );
separator->setSeparator( true );
separator2->setSeparator( true );
separator3->setSeparator( true );
separator4->setSeparator( true );

auto SessionMenu = QMenu();
auto SessionExplorer = QMenu( "Explorer" );
Expand All @@ -384,12 +384,12 @@ void Node::contextMenuEvent( QGraphicsSceneContextMenuEvent* event )
SessionExplorer.setStyleSheet( MenuStyle );

SessionMenu.addAction( "Interact" );
SessionMenu.addAction( seperator );
SessionMenu.addAction( separator );

if ( Agent.MagicValue == DemonMagicValue )
{
SessionMenu.addAction( SessionExplorer.menuAction() );
SessionMenu.addAction( seperator2 );
SessionMenu.addAction( separator2 );
}

if ( Agent.Marked.compare( "Dead" ) != 0 )
Expand All @@ -398,7 +398,7 @@ void Node::contextMenuEvent( QGraphicsSceneContextMenuEvent* event )
SessionMenu.addAction( "Mark as Alive" );

SessionMenu.addAction( "Export" );
SessionMenu.addAction( seperator3 );
SessionMenu.addAction( separator3 );
SessionMenu.addAction( "Remove" );

if ( Agent.MagicValue == DemonMagicValue )
Expand Down Expand Up @@ -595,10 +595,10 @@ void Node::contextMenuEvent( QGraphicsSceneContextMenuEvent* event )

}

delete seperator;
delete seperator2;
delete seperator3;
delete seperator4;
delete separator;
delete separator2;
delete separator3;
delete separator4;
}

void Edge::adjust()
Expand Down Expand Up @@ -827,4 +827,4 @@ void Node::mouseReleaseEvent( QGraphicsSceneMouseEvent* event )
{
update();
QGraphicsItem::mouseReleaseEvent( event );
}
}
30 changes: 15 additions & 15 deletions client/Source/UserInterface/Widgets/TeamserverTabSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ void UserInterface::Widgets::TeamserverTabSession::handleDemonContextMenu( const
}
}

auto seperator = new QAction();
auto seperator2 = new QAction();
auto seperator3 = new QAction();
auto seperator4 = new QAction();
auto separator = new QAction();
auto separator2 = new QAction();
auto separator3 = new QAction();
auto separator4 = new QAction();

seperator->setSeparator( true );
seperator2->setSeparator( true );
seperator3->setSeparator( true );
seperator4->setSeparator( true );
separator->setSeparator( true );
separator2->setSeparator( true );
separator3->setSeparator( true );
separator4->setSeparator( true );

auto SessionMenu = QMenu();
auto SessionExplorer = QMenu( "Explorer" );
Expand All @@ -232,12 +232,12 @@ void UserInterface::Widgets::TeamserverTabSession::handleDemonContextMenu( const
ExitMenu.setStyleSheet( MenuStyle );

SessionMenu.addAction( "Interact" );
SessionMenu.addAction( seperator );
SessionMenu.addAction( separator );

if ( Agent.MagicValue == DemonMagicValue )
{
SessionMenu.addAction( SessionExplorer.menuAction() );
SessionMenu.addAction( seperator2 );
SessionMenu.addAction( separator2 );
}

if ( Agent.Marked.compare( "Dead" ) != 0 )
Expand All @@ -248,7 +248,7 @@ void UserInterface::Widgets::TeamserverTabSession::handleDemonContextMenu( const
SessionMenu.addAction( ColorMenu.menuAction() );

SessionMenu.addAction( "Export" );
SessionMenu.addAction( seperator3 );
SessionMenu.addAction( separator3 );
SessionMenu.addAction( "Remove" );

if ( Agent.MagicValue == DemonMagicValue )
Expand Down Expand Up @@ -460,10 +460,10 @@ void UserInterface::Widgets::TeamserverTabSession::handleDemonContextMenu( const

}

delete seperator;
delete seperator2;
delete seperator3;
delete seperator4;
delete separator;
delete separator2;
delete separator3;
delete separator4;
}


Expand Down
30 changes: 15 additions & 15 deletions payloads/Demon/Include/Common/Native.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ntdll.h
User Mode, 32bit & 64bit version
Visual Studio 6.0 - Visual Studio 2010 and MingW compatible
Intel C++ Compiler (ICL) 11.x - 12.x prefered
Intel C++ Compiler (ICL) 11.x - 12.x preferred

(c) 2019 - Rokas Kupstys
(c) 2009, 2010, 2011 - Fyyre
Expand Down Expand Up @@ -744,7 +744,7 @@ typedef struct _PROCESSOR_NUMBER {
#define FSCTL_GET_RETRIEVAL_POINTERS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 28, METHOD_NEITHER, FILE_ANY_ACCESS) // STARTING_VCN_INPUT_BUFFER, RETRIEVAL_POINTERS_BUFFER
#define FSCTL_MOVE_FILE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 29, METHOD_BUFFERED, FILE_SPECIAL_ACCESS) // MOVE_FILE_DATA,
#define FSCTL_IS_VOLUME_DIRTY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 30, METHOD_BUFFERED, FILE_ANY_ACCESS)
// decomissioned fsctl value 31
// decommissioned fsctl value 31
#define FSCTL_ALLOW_EXTENDED_DASD_IO CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 32, METHOD_NEITHER, FILE_ANY_ACCESS)
#endif /* _WIN32_WINNT >= 0x0400 */

Expand Down Expand Up @@ -1229,7 +1229,7 @@ typedef struct _FILESYSTEM_STATISTICS {
USHORT FileSystemType;
USHORT Version; // currently version 1

ULONG SizeOfCompleteStructure; // must by a mutiple of 64 bytes
ULONG SizeOfCompleteStructure; // must by a multiple of 64 bytes

ULONG UserFileReads;
ULONG UserFileReadBytes;
Expand Down Expand Up @@ -1362,7 +1362,7 @@ typedef struct _NTFS_STATISTICS {
ULONG Clusters; // number of clusters allocated
ULONG Hints; // number of times a hint was specified

ULONG RunsReturned; // number of runs used to satisify all the requests
ULONG RunsReturned; // number of runs used to satisfy all the requests

ULONG HintsHonored; // number of times the hint was useful
ULONG HintsClusters; // number of clusters allocated via the hint
Expand Down Expand Up @@ -2300,13 +2300,13 @@ typedef struct _SD_CHANGE_MACHINE_SID_OUTPUT {
ULONGLONG NumSDChangedSuccess;

//
// How many entires failed the update in the $Secure stream
// How many entries failed the update in the $Secure stream
//

ULONGLONG NumSDChangedFail;

//
// How many entires are unused in the current security stream
// How many entries are unused in the current security stream
//

ULONGLONG NumSDUnused;
Expand All @@ -2330,7 +2330,7 @@ typedef struct _SD_CHANGE_MACHINE_SID_OUTPUT {
ULONGLONG NumMftSDChangedFail;

//
// Total number of entriess process in the $MFT file
// Total number of entries process in the $MFT file
//

ULONGLONG NumMftSDTotal;
Expand Down Expand Up @@ -7398,14 +7398,14 @@ typedef struct _CONTEXT

//
// This section is specified/returned if the
// ContextFlags word contians the flag CONTEXT_FLOATING_POINT.
// ContextFlags word contains the flag CONTEXT_FLOATING_POINT.
//

FLOATING_SAVE_AREA FloatSave;

//
// This section is specified/returned if the
// ContextFlags word contians the flag CONTEXT_SEGMENTS.
// ContextFlags word contains the flag CONTEXT_SEGMENTS.
//

DWORD SegGs;
Expand All @@ -7415,7 +7415,7 @@ typedef struct _CONTEXT

//
// This section is specified/returned if the
// ContextFlags word contians the flag CONTEXT_INTEGER.
// ContextFlags word contains the flag CONTEXT_INTEGER.
//

DWORD Edi;
Expand All @@ -7427,7 +7427,7 @@ typedef struct _CONTEXT

//
// This section is specified/returned if the
// ContextFlags word contians the flag CONTEXT_CONTROL.
// ContextFlags word contains the flag CONTEXT_CONTROL.
//

DWORD Ebp;
Expand Down Expand Up @@ -8638,7 +8638,7 @@ LsaLookupFreeMemory(
#define LSA_MODE_LOG_FULL (0x00000008L)

typedef enum _SECURITY_LOGON_TYPE {
UndefinedLogonType = 0, // This is used to specify an undefied logon type
UndefinedLogonType = 0, // This is used to specify an undefined logon type
Interactive = 2, // Interactively logged on (locally or remotely)
Network, // Accessing system via network
Batch, // Started via a batch queue
Expand Down Expand Up @@ -9222,7 +9222,7 @@ typedef PLSA_TRUST_INFORMATION PTRUSTED_DOMAIN_INFORMATION_BASIC;
#define TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL 0x00000040 // Trust is to be treated as external for trust boundary purposes
#if (_WIN32_WINNT >= 0x0600)
#define TRUST_ATTRIBUTE_TRUST_USES_RC4_ENCRYPTION 0x00000080 // MIT trust with RC4
#define TRUST_ATTRIBUTE_TRUST_USES_AES_KEYS 0x00000100 // Use AES keys to encrypte KRB TGTs
#define TRUST_ATTRIBUTE_TRUST_USES_AES_KEYS 0x00000100 // Use AES keys to encrypt KRB TGTs
#endif
// Trust attributes 0x00000040 through 0x00200000 are reserved for future use
#else
Expand Down Expand Up @@ -9610,7 +9610,7 @@ LsaEnumerateTrustedDomains(
IN LSA_HANDLE PolicyHandle,
IN OUT PLSA_ENUMERATION_HANDLE EnumerationContext,
OUT PVOID *Buffer,
IN ULONG PreferedMaximumLength,
IN ULONG preferredMaximumLength,
OUT PULONG CountReturned
);

Expand Down Expand Up @@ -9761,7 +9761,7 @@ LsaEnumerateTrustedDomainsEx(
IN LSA_HANDLE PolicyHandle,
IN OUT PLSA_ENUMERATION_HANDLE EnumerationContext,
OUT PVOID *Buffer,
IN ULONG PreferedMaximumLength,
IN ULONG preferredMaximumLength,
OUT PULONG CountReturned
);

Expand Down
2 changes: 1 addition & 1 deletion payloads/Demon/Include/Core/Download.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ typedef struct _MEM_FILE
/* Pointer to file contents */
PVOID Data;

/* Has the entire file been recieved? */
/* Has the entire file been received? */
BOOL IsCompleted;

/* Next file in linked list */
Expand Down
6 changes: 3 additions & 3 deletions payloads/Demon/Include/Demon.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ typedef struct
/* MetaData */
PPACKAGE MetaData;

/* The last RequestID recieved by the TS */
/* The last RequestID received by the TS */
UINT32 CurrentRequestID;

/* wheather WSAStartup has been called yet */
/* whether WSAStartup has been called yet */
BOOL WSAWasInitialised;

#ifdef TRANSPORT_HTTP
Expand Down Expand Up @@ -157,7 +157,7 @@ typedef struct

} Config ;

// TODO: format everything by library. inlcude syscalls too
// TODO: format everything by library. include syscalls too
struct
{
/* Ntdll.dll */
Expand Down
2 changes: 1 addition & 1 deletion payloads/Demon/Source/Core/Command.c
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ VOID CommandScreenshot( PPARSER Parser )
PVOID Image = NULL;
SIZE_T Size = 0;

// TODO: add error cheking in WinScreenshot and send screenshot in pieces
// TODO: add error checking in WinScreenshot and send screenshot in pieces

if ( WinScreenshot( &Image, &Size ) )
{
Expand Down