forked from outflanknl/C2-Tool-Collection
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'outflanknl:main' into main
- Loading branch information
Showing
132 changed files
with
15,727 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
from typing import List, Tuple | ||
|
||
from outflank_stage1.task.base_bof_task import BaseBOFTask | ||
from outflank_stage1.task.enums import BOFArgumentEncoding | ||
|
||
|
||
class AddMachineAccountBOF(BaseBOFTask): | ||
def __init__(self): | ||
super().__init__("AddMachineAccount") | ||
|
||
self.parser.description = ( | ||
"Add a computer account to the Active Directory domain." | ||
) | ||
self.parser.epilog = "Use Active Directory Service Interfaces (ADSI) to add a computer account to AD." | ||
|
||
self.parser.add_argument("computername", help="Computer name") | ||
|
||
self.parser.add_argument( | ||
"password", | ||
help="Password", | ||
nargs="?", | ||
) | ||
|
||
def _encode_arguments_bof( | ||
self, arguments: List[str] | ||
) -> List[Tuple[BOFArgumentEncoding, str]]: | ||
parser_arguments = self.parser.parse_args(arguments) | ||
|
||
if parser_arguments.password is not None: | ||
return [ | ||
(BOFArgumentEncoding.WSTR, parser_arguments.computername), | ||
(BOFArgumentEncoding.WSTR, parser_arguments.password), | ||
] | ||
|
||
return [(BOFArgumentEncoding.WSTR, parser_arguments.computername)] | ||
|
||
|
||
class DelMachineAccountBOF(BaseBOFTask): | ||
def __init__(self): | ||
super().__init__("DelMachineAccount") | ||
|
||
self.parser.description = ( | ||
"Remove a computer account from the Active Directory domain." | ||
) | ||
self.parser.epilog = "Use Active Directory Service Interfaces (ADSI) to delete a computer account from AD." | ||
|
||
self.parser.add_argument("computername", help="Computer name") | ||
|
||
def _encode_arguments_bof( | ||
self, arguments: List[str] | ||
) -> List[Tuple[BOFArgumentEncoding, str]]: | ||
parser_arguments = self.parser.parse_args(arguments) | ||
|
||
return [(BOFArgumentEncoding.WSTR, parser_arguments.computername)] | ||
|
||
|
||
class GetMachineAccountQuota(BaseBOFTask): | ||
def __init__(self): | ||
super().__init__("GetMachineAccountQuota") | ||
|
||
self.parser.description = ( | ||
"Read the MachineAccountQuota value from the Active Directory domain." | ||
) | ||
|
||
self.parser.epilog = "Use Active Directory Service Interfaces (ADSI) to read the ms-DS-MachineAccountQuota value from AD." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
SRC = $(wildcard *.c) | ||
OBJS = $(patsubst %.c, %.o, $(SRC)) | ||
CC_x86 := i686-w64-mingw32-gcc | ||
CC_x64 := x86_64-w64-mingw32-gcc | ||
STRIP_x86 := i686-w64-mingw32-strip | ||
STRIP_x64 := x86_64-w64-mingw32-strip | ||
CFLAGS := -masm=intel | ||
|
||
all: $(OBJS) | ||
|
||
%.o: %.c | ||
$(CC_x64) $(CFLAGS) -o ../$@ -c $< | ||
$(STRIP_x64) --strip-unneeded ../$@ | ||
$(CC_x64) $(CFLAGS) -o ../$*.x64.o -c $< | ||
$(STRIP_x64) --strip-unneeded ../$*.x64.o | ||
|
||
$(CC_x86) $(CFLAGS) -o ../$*.x86.o -DWOW64 -fno-leading-underscore -c $< | ||
$(STRIP_x86) --strip-unneeded ../$*.x86.o | ||
|
||
clean: | ||
rm ../*.o | ||
rm ../*.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import argparse | ||
from typing import List, Tuple, Optional | ||
|
||
from outflank_stage1.implant import ImplantArch | ||
from outflank_stage1.task.base_bof_task import BaseBOFTask | ||
from outflank_stage1.task.enums import BOFArgumentEncoding | ||
|
||
|
||
class AskCredsBOF(BaseBOFTask): | ||
def __init__(self): | ||
super().__init__("Askcreds") | ||
|
||
self.parser.description = ( | ||
"Collect passwords using CredUIPromptForWindowsCredentialsName." | ||
) | ||
|
||
self.parser.add_argument( | ||
"reason", | ||
help="This reason is displayed as part of the prompt (default: Restore Network Connection).", | ||
nargs=argparse.REMAINDER, | ||
) | ||
|
||
self.parser.epilog = "Collect passwords by simply asking." | ||
|
||
def _encode_arguments_bof( | ||
self, arguments: List[str] | ||
) -> List[Tuple[BOFArgumentEncoding, str]]: | ||
parser_arguments = self.parser.parse_args(arguments) | ||
|
||
if parser_arguments.reason is None: | ||
return [] | ||
|
||
return [(BOFArgumentEncoding.WSTR, " ".join(parser_arguments.reason))] | ||
|
||
def run(self, arguments: List[str]): | ||
self.append_response( | ||
"Askcreds BOF by Outflank, waiting max 60sec for user input...\n" | ||
) | ||
super().run(arguments) |
Oops, something went wrong.