Module 19 Flashcards

(54 cards)

1
Q

What is the primary goal of the Defence Evasion tactic [TA0005]?

A

Adversaries attempt to avoid detection throughout all phases of their operation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the main purpose of the Cobalt Strike Artifact Kit?

A

To modify the source code for compiled payload templates (.exe, .dll, .svc.exe) to evade anti-virus signatures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In Cobalt Strike template naming, what does the suffix ‘big’ signify?

A

The template is for a stageless payload.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In Cobalt Strike template naming, what does the suffix ‘svc’ signify?

A

The template is for a service binary payload.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The Cobalt Strike payload templates are essentially _____ injectors, whose only role is to inject the Beacon shellcode into memory and execute it.

A

shellcode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In the Artifact Kit, which C file is the entry point for .exe templates?

A

main.c in the src-main directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In the Artifact Kit, which C file is the entry point for .dll templates?

A

dllmain.c in the src-main directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the purpose of the bypass-*.c files in the src-common directory of the Artifact Kit?

A

They contain various anti-sandbox techniques that can be built into a payload template.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the default anti-sandbox technique used by the built-in Cobalt Strike templates?

A

The dist-readfile technique.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which file in the Artifact Kit contains most of the main logic for performing shellcode injection?

A

patch.c.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

In the Artifact Kit’s build.sh script, what does the ‘Allocator’ parameter control?

A

It sets which API (e.g., HeapAlloc, VirtualAlloc) is used to allocate memory for the shellcode.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When using the build.sh script in the Artifact Kit, setting the ‘Resource File’ parameter to true allows for changing what properties of the artifact?

A

Metadata such as CompanyName, FileDescription, and ProductName, as defined in src-main/resource.rc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the recommended first step when using ThreatCheck to find malicious code in an artifact?

A

Scan the unmodified, newly built artifact to identify the specific offset of the code block that is detected.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

After ThreatCheck identifies a malicious offset in an artifact, what tool can be used to disassemble and decompile the binary for further analysis?

A

Ghidra.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In Ghidra, how do you navigate to a specific file offset identified by a tool like ThreatCheck?

A

Use the Navigation > Go To menu and enter file(0xOFFSET).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is an effective strategy to bypass a signature on a specific loop in the artifact source code?

A

Modify the loop’s structure (e.g., convert a for loop to a backwards while loop) to compile into different machine code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

After building new templates with the Artifact Kit, which generated file must be loaded into the Cobalt Strike client to use them?

A

The Aggressor script, artifact.cna.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the primary purpose of the Cobalt Strike Resource Kit?

A

To modify script-based payload templates, such as those for PowerShell.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is the primary security concern that the Resource Kit aims to address for PowerShell payloads?

A

Detection by the Antimalware Scan Interface (AMSI).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

In the default PowerShell template (template.x64.ps1), which .NET method is often flagged by AMSI for copying shellcode into memory?

A

System.Runtime.InteropServices.Marshal::Copy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What native API can be used as an alternative to Marshal.Copy in PowerShell to evade some AMSI signatures?

A

The WriteProcessMemory API.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is the function of the compress.ps1 script in the Resource Kit?

A

It serves as a template for Cobalt Strike’s Scripted Web Delivery, which GZIP compresses and Base64 encodes the main PowerShell payload.

23
Q

When obfuscating compress.ps1 for evasion, why must the %%DATA%% placeholder be left untouched?

A

Cobalt Strike uses this exact placeholder to patch the encoded payload into the script.

24
Q

What Malleable C2 technique overwrites a legitimate DLL in memory with Beacon to make the memory region appear backed by a file on disk?

A

Module stomping.

25
Which Malleable C2 `stage` block option is used to enable module stomping?
`set module_x64 "SomeLegit.dll";`
26
By default, Beacon's reflective loader allocates memory with what permissions, which can be suspicious in native applications?
RWX (read, write, and execute).
27
Setting `stage.userwx` to `"false"` in a Malleable C2 profile causes the reflective loader to do what?
It sets granular permissions for each memory section (e.g., RX for .text, RW for .data) instead of a single RWX region.
28
What is the purpose of setting `stage.copy_pe_header` to `"false"` in Malleable C2?
It instructs the reflective loader not to copy Beacon's PE headers into memory, slightly reducing its detection surface.
29
In Cobalt Strike's 'fork and run' workflow, how does Beacon retrieve the output from a post-exploitation DLL running in another process?
The post-ex DLL writes its output to an SMB named pipe, which Beacon then connects to and reads from.
30
What is a common Windows API used for thread injection that can be detected by security products via `PsSetCreateThreadNotifyRoutine`?
`CreateRemoteThread`.
31
Which Malleable C2 block is used to configure alternative remote thread creation techniques for post-exploitation jobs?
The `process-inject { execute { ... } }` block.
32
The _____ Malleable C2 option can be used to change the default post-exploitation named pipe names to avoid signature-based detection.
`post-ex.pipename`
33
What is the purpose of the `spawnto` command in Beacon?
To change the process that the current Beacon will spawn for its fork-and-run commands, helping to blend in with parent-child process relationships.
34
Which Malleable C2 option sets the default spawn-to process for all Beacons from that team server?
`post-ex.spawnto_x64` and `post-ex.spawnto_x86`.
35
Why does the service binary used by `jump psexec` require a separate command, `ak-settings`, to configure its spawn-to process?
The service binary artifact cannot use a spawn-to value that contains environment variables like `%windir%`, so it needs a hardcoded path.
36
What is Parent Process ID (PPID) spoofing used for in post-exploitation?
It allows a new process to be spawned with an arbitrary parent process, which can break anomalous parent-child relationships.
37
Which Beacon command is used to set a spoofed parent process ID?
`ppid `.
38
Setting `post-ex.amsi_disable` to `"true"` in Malleable C2 causes the post-ex reflective loader to do what?
It patches the AMSI DLL in memory before executing a .NET assembly or PowerShell script via powerpick/psinject.
39
The `post-ex.amsi_disable` setting does NOT apply to which Beacon command for running PowerShell?
The `powershell` command; `powerpick` or `psinject` must be used instead.
40
What does the `post-ex.obfuscate "true";` setting do for post-exploitation DLLs?
It scrambles the DLL content and settles it into memory in a more OPSEC-safe way, similar to `stage.userwx` for Beacon.
41
What is the function of the `post-ex.cleanup "true";` Malleable C2 option?
It frees the memory occupied by the post-exploitation reflective loader after the post-ex DLL has been loaded.
42
In Malleable C2, what is the difference between `strrep` and `strrepex` within the `transform-x64` block?
`strrep` replaces a string in all post-ex DLLs, while `strrepex` replaces a string in a single, specified post-ex DLL.
43
AppLocker is a Windows technology that prevents users from running unapproved applications based on rules with a permission and a _____.
condition
44
What are the three types of conditions an AppLocker rule can be based on?
Publisher, Path, and File hash.
45
Where in the Windows Registry are local AppLocker policies stored?
`HKLM\Software\Policies\Microsoft\Windows\SrpV2`
46
Which native PowerShell cmdlet can be used to parse and display the effective AppLocker policy on a local machine?
`Get-AppLockerPolicy -Effective`
47
When enumerating GPOs for AppLocker policies, which file within the GPO's `Machine` directory contains the policy data?
`Registry.pol`
48
How can an AppLocker path rule like `` be bypassed?
By placing an executable in any user-creatable directory named `App-V`, because the start of the path is not anchored.
49
Name two directories within `C:\Windows` that are often writable by standard users and can be used to bypass default AppLocker path rules.
Any two of: `C:\Windows\Tasks`, `C:\Windows\Temp`, `C:\windows\tracing`, or various subdirectories under `C:\Windows\System32\spool`.
50
What is a LOLBAS that can be used to bypass AppLocker by executing arbitrary C# code from a `.csproj` file?
MSBuild.exe.
51
When AppLocker is enforced, it typically changes PowerShell's language mode to what?
ConstrainedLanguage mode.
52
How can PowerShell's Constrained Language Mode be bypassed to execute arbitrary code?
By creating and loading a custom COM object that points to a malicious DLL, since `New-Object -ComObject` is not restricted.
53
If AppLocker DLL rules are not enabled, what common Windows utility can be used to execute a Beacon payload DLL?
`rundll32.exe`.
54
The Beacon DLL payload exports a function specifically for use with `rundll32`. What is the name of this function?
`StartW`.