From f20bcac9a9b9f7fd4b6293b57de279ab6c050bed Mon Sep 17 00:00:00 2001 From: Liliesh Date: Sat, 2 Nov 2024 11:26:29 +0100 Subject: [PATCH] Inital commit --- .gitignore | 7 +++++++ X570PG4/docs.adoc | 19 +++++++++++++++++++ X570PG4/download_fw.sh | 2 ++ X570PG4/extract.sh | 16 ++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 .gitignore create mode 100644 X570PG4/docs.adoc create mode 100755 X570PG4/download_fw.sh create mode 100644 X570PG4/extract.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..09181f6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +*.bin +*.lzma +*.jpeg +*.png +sections/ +*.zip +X570PG4*.* diff --git a/X570PG4/docs.adoc b/X570PG4/docs.adoc new file mode 100644 index 0000000..6ec9174 --- /dev/null +++ b/X570PG4/docs.adoc @@ -0,0 +1,19 @@ += Reversing of the AsRock X570 Phantom Gaming 4 firmware image + +== Steps +1. download fw +2. binwalk + + +== Mappings +=== 4456808 +Compressed lzma +Contains boot images + +|=== +| Start, Length, Type, Description +| 4456808, 15525, LZMA Archive, Boot splash images +|=== +4456808 = lzma = jpg images +4591952 = lzma = windows pe binaries - unknown usage +4633968 = lzma = win-pe bins, aes-s box diff --git a/X570PG4/download_fw.sh b/X570PG4/download_fw.sh new file mode 100755 index 0000000..ae06613 --- /dev/null +++ b/X570PG4/download_fw.sh @@ -0,0 +1,2 @@ +wget "https://download.asrock.com/BIOS/AM4/X570%20Phantom%20Gaming%204(5.60)ROM.zip" -O ASX570FW.zip +7z x ASX570FW.zip diff --git a/X570PG4/extract.sh b/X570PG4/extract.sh new file mode 100644 index 0000000..164ac4d --- /dev/null +++ b/X570PG4/extract.sh @@ -0,0 +1,16 @@ +mkdir sections + +# Section 4456808 +echo "Extracting 4456808" +mkdir sections/4456808 +dd if=X570PG45.60 skip=4456808 bs=1 count=15525 of=sections/4456808/image.lzma +unlzma sections/4456808/image.lzma +dd if=sections/4456808/image skip=4 bs=1 count=12196 of=sections/4456808/4.jpeg +dd if=sections/4456808/image skip=12204 bs=1 count=5601 of=sections/4456808/12204.jpeg + +# Section 4591952 +echo "Extracting 4591952" +mkdir sections/4591952 +dd if=X570PG45.60 skip=4591952 bs=1 count=41951 of=sections/4591952/image.lzma +unlzma sections/4591952/image.lzma +dd if=sections/4591952/image skip=204 bs=1 count=2020 of=sections/4591952/204.bin