DD Binary Padding Hash Change

Metadata

Contributors

Roberto Rodriguez @Cyb3rWard0g

Creation Date

2020/11/10

Modification Date

2020/11/10

Tactics

TA0005

Techniques

T1027.001

Tags

None

Dataset Description

This dataset represents a threat actor using dd to add a zero to the binary to change the hash.

Simulation Metadata

Tools

type

Name

Module

Manual

sh

sh

Adversary View

md5sum /tmp/psexec.py 
5aa8b93e9b40c04d6d9d0cc8cd3975ed  /tmp/psexec.py

dd if=/dev/zero bs=1 count=1 >> /tmp/psexec.py 
1+0 records in
1+0 records out
1 byte copied, 5.6002e-05 s, 17.9 kB/s

md5sum /tmp/psexec.py 
c509e5bd899de81d603da3f61e717837  /tmp/psexec.py

Explore Datasets

Download & Decompress Dataset

import requests
from zipfile import ZipFile
from io import BytesIO

url = https://raw.githubusercontent.com/OTRF/Security-Datasets/master/datasets/atomic/linux/defense_evasion/host/sh_binary_padding_dd.zip
zipFileRequest = requests.get(url)
zipFile = ZipFile(BytesIO(zipFileRequest.content))
datasetJSONPath = zipFile.extract(zipFile.namelist()[0])

Read JSON File

from pandas.io import json

df = json.read_json(path_or_buf=datasetJSONPath, lines=True)

Access Security Events

df.head(1)