Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Adversaries may use Obfuscated Files or Information to hide artifacts of an intrusion from analysis.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | -30% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 65% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 6% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 59% | 0% |
| case-20 | ✗→✓ | ▲ Improved | 191% | 0% |
Adversaries may use Obfuscated Files or Information to hide artifacts of an intrusion from analysis. They may require separate mechanisms to decode or deobfuscate that information depending on how they intend to use it. Methods for doing that include built-in functionality of malware or by using utilities present on the system.
One such example is the use of certutil to decode a remote access tool portable executable file that has been hidden inside a certificate file. Another example is using the Windows <code>copy /b</code> or <code>type</code> command to reassemble binary fragments into a malicious payload.
Sometimes a user's action may be required to open it for deobfuscation or decryption as part of User Execution. The user may also be required to input a password to open a password protected compressed/encrypted file that was provided by the adversary.
Platforms: ESXi, Linux, macOS, Windows
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Encode/Decode executable Upon execution a file named T1140_calc_decoded.exe will be placed in the temp folder
Supported Platforms: windows
cmdcertutil -encode #{executable} %temp%\T1140_calc.txt certutil -decode %temp%\T1140_calc.txt %temp%\T1140_calc_decoded.exe
Rename certutil and decode a file. This is in reference to latest research by FireEye here
Supported Platforms: windows
cmdcopy %windir%\system32\certutil.exe %temp%\tcm.tmp %temp%\tcm.tmp -encode #{executable} %temp%\T1140_calc2.txt %temp%\tcm.tmp -decode %temp%\T1140_calc2.txt %temp%\T1140_calc2_decoded.exe
Use Python to decode a base64-encoded text string and echo it to the console
Supported Platforms: linux, macos
bashENCODED=$(python3 -c 'import base64;enc=base64.b64encode("#{message}".encode());print(enc.decode())') python3 -c "import base64;dec=base64.b64decode(\"$ENCODED\");print(dec.decode())" python3 -c "import base64 as d;dec=d.b64decode(\"$ENCODED\");print(dec.decode())" python3 -c "from base64 import b64decode;dec=b64decode(\"$ENCODED\");print(dec.decode())" python3 -c "from base64 import b64decode as d;dec=d(\"$ENCODED\");print(dec.decode())" echo $ENCODED | python3 -c "import base64,sys;dec=base64.b64decode(sys.stdin.read());print(dec.decode())" echo $ENCODED > #{encoded_file} && python3 -c "import base64;dec=base64.b64decode(open('#{encoded_file}').read());print(dec.decode())"
Dependencies:
Use Perl to decode a base64-encoded text string and echo it to the console
Supported Platforms: linux, macos
bashENCODED=$(perl -e "use MIME::Base64;print(encode_base64('#{message}'));") perl -le "use MIME::Base64;print(decode_base64('$ENCODED'));" echo $ENCODED | perl -le 'use MIME::Base64;print(decode_base64(<STDIN>));' echo $ENCODED > #{encoded_file} && perl -le 'use MIME::Base64;open($f,"<","#{encoded_file}");print(decode_base64(<$f>));'
Dependencies:
Use common shell utilities to decode a base64-encoded text string and echo it to the console
Supported Platforms: linux, macos
bashENCODED=$(echo '#{message}' | base64) printf $ENCODED | base64 -d echo $ENCODED | base64 -d echo $(echo $ENCODED) | base64 -d echo $ENCODED > #{encoded_file} && base64 -d #{encoded_file} echo $ENCODED > #{encoded_file} && base64 -d < #{encoded_file} echo $ENCODED > #{encoded_file} && cat #{encoded_file} | base64 -d echo $ENCODED > #{encoded_file} && cat < #{encoded_file} | base64 -d bash -c "{echo,\"$(echo $ENCODED)\"}|{base64,-d}"
If Atomic Red Team tests are not applicable, manually verify the technique by:
No specific mitigations documented for this technique.
| Finding | Severity | Impact | | ------------------------------------------------------------ | -------- | --------------- | | Deobfuscate/Decode Files or Information technique applicable | Medium | Defense Evasion |
| CWE ID | Title | | ------- | ---------------------------- | | CWE-693 | Protection Mechanism Failure |
Other measured skills in the registry, with their headline benchmark lift.