Skip to content

Commit a7e3c06

Browse files
committed
Merge branch 'ask_mfa'
2 parents f78ed2c + fad885d commit a7e3c06

File tree

8 files changed

+481
-1
lines changed

8 files changed

+481
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# VS Code files for those working on multiple tools
2+
.vscode/*

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ You are welcome to use these, but issues opened related to these will be closed
2020
|adcs_request_on_behalf| adcs_request_on_behalf [TEMPLATE] [REQUESTER] [ENROLLMENT_AGENT.pfx] [Download_Name] | Request an enrollment certificate on behalf of another user|
2121
|adduser| adduser [USERNAME] [PASSWORD] [SERVER] | Add specified user to a machine|
2222
|addusertogroup| addusertogroup [USERNAME] [GROUPNAME] [SERVER] [DOMAIN] | Add specified user to a group|
23+
|ask_mfa | ask_mfa [NUMBER] | Displays a fake Microsoft Authenticator approval dialog with the specified number. |
2324
|chromeKey| chromeKey | Decrypt the provided base64 encoded Chrome key|
2425
|enableuser| enableuser [USERNAME] [DOMAIN] | Enable and unlock the specified user account|
2526
|get_azure_token| get_azure_token [CLIENT ID] [SCOPE] [BROWSER] [OPT:HINT] [OPT:BROWSER PATH] | Attempts to complete an OAuth codeflow grant against azure using saved logins |

Remote/Remote.cna

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,3 +2209,29 @@ Example:
22092209

22102210
"
22112211
);
2212+
2213+
alias ask_mfa {
2214+
local('$mfa_number $args');
2215+
if(size(@_) != 2)
2216+
{
2217+
berror($1, "usage: ask_mfa <mfa_number>");
2218+
return;
2219+
}
2220+
$mfa_number = parseNumber($2, 10);
2221+
2222+
# Validate MFA number range (typically 0-99 for 2-digit codes)
2223+
if($mfa_number < 0 || $mfa_number > 99)
2224+
{
2225+
berror($1, "MFA number should be between 0-99");
2226+
return;
2227+
}
2228+
2229+
$args = bof_pack($1, "i", $mfa_number);
2230+
beacon_inline_execute($1, readbof($1, "ask_mfa"), "go", $args);
2231+
}
2232+
2233+
beacon_command_register(
2234+
"ask_mfa",
2235+
"Displays a fake Microsoft MFA approval dialog",
2236+
"Command: ask_mfa\n\nUsage: ask_mfa [NUMBER]\n\nDisplays a fake Microsoft Authenticator approval dialog with the specified number.\nThe dialog auto-closes after 30 seconds or when the user closes it.\n\nExample: ask_mfa 42"
2237+
);

Remote/ask_mfa/ask_mfa.x64.o

8.44 KB
Binary file not shown.

Remote/ask_mfa/ask_mfa.x86.o

8.78 KB
Binary file not shown.

src/Remote/ask_mfa/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
BOFNAME := ask_mfa
2+
COMINCLUDE := -I ../../common
3+
CC_x64 := x86_64-w64-mingw32-gcc
4+
CC_x86 := i686-w64-mingw32-gcc
5+
CC := x86_64-w64-mingw32-clang
6+
7+
all:
8+
$(CC_x64) -o $(BOFNAME).x64.o $(COMINCLUDE) -Os -c entry.c -DBOF
9+
$(CC_x86) -o $(BOFNAME).x86.o $(COMINCLUDE) -Os -c entry.c -DBOF
10+
mkdir -p ../../../Remote/$(BOFNAME)
11+
mv $(BOFNAME)*.o ../../../Remote/$(BOFNAME)
12+
13+
clean:
14+
rm $(BOFNAME).*.exe

0 commit comments

Comments
 (0)