Extract Samsung BIOS WPH

From richud.com
Jump to navigation Jump to search


Special File Magic

Create this special file magic for Samsung BIOS's pack type (filename offset 108 bytes before start of GZip archive) , in my example as /home/rich/.binwalk/magic/binwalk

0x108    string    \x1f\x8b\x08	gzip packed file,{offset-adjust:0x108}
>0       string    x               {file-name:%s}
>0       string    x               original file name: "%s"

Get Binwalk 2.0 Master git

I am doing this in Ubuntu 13.10, the built in binwalk is too old to work.

You need to download it , build it, and install it (obv this breaks the older version in Ubuntu, but I couldn't get it working (quickly enough) without 'make install' due to python issues)

Pull latest binwalk master git (6/March/2014 or later due to commit to fix --dd, many thanks to devttys0 for help & fix!)

git clone https://github.com/devttys0/binwalk.git

Build it ./configure ; make ; sudo make install

Run it like this pointing to your created binwalk file magic, (where WIN_R590_11JB.exe is the downloaded Samsung BIOS file to extract.)

Extract Samsung BIOS

/usr/local/bin/binwalk --dd="gzip::gunzip %e" -m"/home/rich/.binwalk/magic/binwalk" WIN_R590_11JB.exe

Example

$ /usr/local/bin/binwalk --dd="gzip::gunzip %e" -m"/home/rich/.binwalk/magic/binwalk" 11SV_WIN.exe

DECIMAL       HEXADECIMAL     DESCRIPTION
------------------------------------------------------------------------------------------------------------------------------------------------------
164116        0x28114         gzip packed file,  original file name: "11SV.wph.gz"
1330093       0x144BAD        gzip packed file,  original file name: "11SV_M.BIN.gz"
1357143       0x14B557        gzip packed file,  original file name: "AddMem.sys.gz"
1358999       0x14BC97        gzip packed file,  original file name: "ConResChs.dll.gz"
1376686       0x1501AE        gzip packed file,  original file name: "ConResCht.dll.gz"
1394346       0x1546AA        gzip packed file,  original file name: "ConResEn.dll.gz"
1412340       0x158CF4        gzip packed file,  original file name: "ConResFr.dll.gz"
1430443       0x15D3AB        gzip packed file,  original file name: "ConResGr.dll.gz"
1448546       0x161A62        gzip packed file,  original file name: "ConResKr.dll.gz"
1466455       0x166057        gzip packed file,  original file name: "ConResPo.dll.gz"
1484564       0x16A714        gzip packed file,  original file name: "ConResRu.dll.gz"
1502743       0x16EE17        gzip packed file,  original file name: "ConResSp.dll.gz"
1520813       0x1734AD        gzip packed file,  original file name: "mfc42.dll.gz"
1987852       0x1E550C        gzip packed file,  original file name: "msvcp60.dll.gz"
2104266       0x201BCA        gzip packed file,  original file name: "msvcrt.dll.gz"
2236372       0x221FD4        gzip packed file,  original file name: "PHLASH.INI.gz"
2236777       0x222169        gzip packed file,  original file name: "PhlashLc.dll.gz"
2257701       0x227325        gzip packed file,  original file name: "PhlashNT.sys.gz"
2277611       0x22C0EB        gzip packed file,  original file name: "SWinFlash.exe.gz"
2359740       0x2401BC        gzip packed file,  original file name: "winhlp32.exe.gz"
2508622       0x26474E        gzip packed file,  original file name: "WinUpV01_10.exe.gz"

$ 

Extracted BIOS files!

You should then end up with a sub folder with extracted Samsung BIOS files in

$ ls -la _11SV_WIN.exe.extracted
total 4816
drwxr-xr-x 2 rich rich    4096 Mar  7 15:58 .
drwxr-xr-x 6 rich rich    4096 Mar  7 15:58 ..
-rw-r--r-- 1 rich rich   57344 Mar  7 15:58 11SV_M.BIN
-rw-r--r-- 1 rich rich 1615194 Mar  7 15:58 11SV.wph
-rw-r--r-- 1 rich rich    3205 Mar  7 15:58 AddMem.sys
-rw-r--r-- 1 rich rich   65536 Mar  7 15:58 ConResChs.dll
-rw-r--r-- 1 rich rich   65536 Mar  7 15:58 ConResCht.dll
-rw-r--r-- 1 rich rich   69632 Mar  7 15:58 ConResEn.dll
-rw-r--r-- 1 rich rich   69632 Mar  7 15:58 ConResFr.dll
-rw-r--r-- 1 rich rich   69632 Mar  7 15:58 ConResGr.dll
-rw-r--r-- 1 rich rich   65536 Mar  7 15:58 ConResKr.dll
-rw-r--r-- 1 rich rich   69632 Mar  7 15:58 ConResPo.dll
-rw-r--r-- 1 rich rich   69632 Mar  7 15:58 ConResRu.dll
-rw-r--r-- 1 rich rich   69632 Mar  7 15:58 ConResSp.dll
-rw-r--r-- 1 rich rich  995383 Mar  7 15:58 mfc42.dll
-rw-r--r-- 1 rich rich  401462 Mar  7 15:58 msvcp60.dll
-rw-r--r-- 1 rich rich  266293 Mar  7 15:58 msvcrt.dll
-rw-r--r-- 1 rich rich     170 Mar  7 15:58 PHLASH.INI
-rw-r--r-- 1 rich rich  204800 Mar  7 15:58 PhlashLc.dll
-rw-r--r-- 1 rich rich   40120 Mar  7 15:58 PhlashNT.sys
-rw-r--r-- 1 rich rich  319488 Mar  7 15:58 SWinFlash.exe
-rw-r--r-- 1 rich rich  283648 Mar  7 15:58 winhlp32.exe
-rw-r--r-- 1 rich rich   98304 Mar  7 15:58 WinUpV01_10.exe
$ 


blog comments powered by Disqus