బిన్‌వాక్‌ని ఉపయోగించి ఇంటి రూటర్‌ను రివర్స్ ఇంజనీరింగ్ చేయండి. మీరు మీ రూటర్ సాఫ్ట్‌వేర్‌ను విశ్వసిస్తున్నారా?

బిన్‌వాక్‌ని ఉపయోగించి ఇంటి రూటర్‌ను రివర్స్ ఇంజనీరింగ్ చేయండి. మీరు మీ రూటర్ సాఫ్ట్‌వేర్‌ను విశ్వసిస్తున్నారా?

కొన్ని రోజుల క్రితం, నేను బిన్‌వాక్‌ని ఉపయోగించి నా రూటర్ యొక్క ఫర్మ్‌వేర్‌ను రివర్స్ ఇంజనీర్ చేయాలని నిర్ణయించుకున్నాను.

నేనే కొన్నాను TP-లింక్ ఆర్చర్ C7 హోమ్ రూటర్. ఉత్తమ రూటర్ కాదు, కానీ నా అవసరాలకు సరిపోతుంది.

నేను కొత్త రూటర్‌ని కొనుగోలు చేసిన ప్రతిసారీ, నేను ఇన్‌స్టాల్ చేస్తాను openwrt. దేనికోసం? నియమం ప్రకారం, తయారీదారులు తమ రౌటర్‌లకు మద్దతు ఇవ్వడం గురించి పెద్దగా పట్టించుకోరు మరియు కాలక్రమేణా సాఫ్ట్‌వేర్ పాతది అవుతుంది, దుర్బలత్వాలు కనిపిస్తాయి మరియు సాధారణంగా, మీకు ఆలోచన వస్తుంది. అందువల్ల, నేను OpenWRT ఫర్మ్‌వేర్‌ను ఇష్టపడతాను, దీనికి ఓపెన్ సోర్స్ కమ్యూనిటీ బాగా మద్దతు ఇస్తుంది.

OpenWRT డౌన్‌లోడ్ చేసిన తర్వాత, నేను కూడా తాజా ఫర్మ్‌వేర్ చిత్రాన్ని డౌన్‌లోడ్ చేసారు అధికారిక వెబ్‌సైట్ నుండి నా కొత్త ఆర్చర్ C7 క్రింద మరియు దానిని విశ్లేషించాలని నిర్ణయించుకున్నాను. పూర్తిగా వినోదం కోసం మరియు బిన్‌వాక్ గురించి మాట్లాడండి.

బిన్‌వాక్ అంటే ఏమిటి?

బిన్వాక్ విశ్లేషణ, రివర్స్ ఇంజనీరింగ్ మరియు ఫర్మ్‌వేర్ ఇమేజ్ ఎక్స్‌ట్రాక్షన్ కోసం ఓపెన్ సోర్స్ సాధనం.

2010లో క్రెయిగ్ హెఫ్ఫ్నర్ రూపొందించారు, బిన్‌వాక్ ఫర్మ్‌వేర్ చిత్రాలను స్కాన్ చేయగలదు మరియు ఫైల్‌లను కనుగొనగలదు, ఫైల్ సిస్టమ్ ఇమేజ్‌లు, ఎక్జిక్యూటబుల్ కోడ్, కంప్రెస్డ్ ఆర్కైవ్‌లు, బూట్‌లోడర్‌లు మరియు కెర్నలు, JPEG మరియు PDF వంటి ఫైల్ ఫార్మాట్‌లు మరియు మరిన్నింటిని గుర్తించగలదు మరియు సంగ్రహించగలదు.

ఫర్మ్‌వేర్ ఎలా పనిచేస్తుందో అర్థం చేసుకోవడానికి మీరు దాన్ని రివర్స్ ఇంజనీర్ చేయడానికి బిన్‌వాక్‌ని ఉపయోగించవచ్చు. దుర్బలత్వాల కోసం బైనరీ ఫైల్‌లను శోధించండి, ఫైల్‌లను సంగ్రహించండి మరియు బ్యాక్‌డోర్‌లు లేదా డిజిటల్ సర్టిఫికెట్‌ల కోసం చూడండి. మీరు కూడా కనుగొనవచ్చు opcodes వివిధ CPUల సమూహం కోసం.

మీరు నిర్దిష్ట పాస్‌వర్డ్ ఫైల్‌ల కోసం (పాస్‌డబ్ల్యుడి, షాడో మొదలైనవి) వెతకడానికి ఫైల్‌సిస్టమ్ చిత్రాలను సంగ్రహించవచ్చు మరియు పాస్‌వర్డ్ హాష్‌లను విచ్ఛిన్నం చేయడానికి ప్రయత్నించవచ్చు. మీరు రెండు లేదా అంతకంటే ఎక్కువ ఫైళ్ల మధ్య బైనరీ పార్సింగ్ చేయవచ్చు. కంప్రెస్డ్ డేటా లేదా ఎన్‌కోడ్ చేసిన ఎన్‌క్రిప్షన్ కీల కోసం మీరు డేటాపై ఎంట్రోపీ విశ్లేషణ చేయవచ్చు. సోర్స్ కోడ్ యాక్సెస్ అవసరం లేకుండా ఇవన్నీ.

సాధారణంగా, మీకు కావలసినవన్నీ ఉన్నాయి :)

బిన్‌వాక్ ఎలా పని చేస్తుంది?

బిన్‌వాక్ యొక్క ప్రధాన లక్షణం దాని సంతకం స్కానింగ్. బిన్‌వాక్ వివిధ అంతర్నిర్మిత ఫైల్ రకాలు మరియు ఫైల్ సిస్టమ్‌ల కోసం శోధించడానికి ఫర్మ్‌వేర్ చిత్రాన్ని స్కాన్ చేయగలదు.

కమాండ్ లైన్ యుటిలిటీ మీకు తెలుసా file?

file /bin/bash
/bin/bash: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=12f73d7a8e226c663034529c8dd20efec22dde54, stripped

జట్టు fileఫైల్ హెడర్‌ని చూస్తుంది మరియు ఫైల్ రకాన్ని గుర్తించడానికి సంతకం (మ్యాజిక్ నంబర్) కోసం చూస్తుంది. ఉదాహరణకు, ఫైల్ బైట్‌ల క్రమంతో ప్రారంభమైతే 0x89 0x50 0x4E 0x47 0x0D 0x0A 0x1A 0x0A, ఇది PNG ఫైల్ అని దానికి తెలుసు. పై వికీపీడియా సాధారణ ఫైల్ సంతకాల జాబితా ఉంది.

Binwalk అదే విధంగా పనిచేస్తుంది. కానీ ఫైల్ ప్రారంభంలో మాత్రమే సంతకాల కోసం వెతకడానికి బదులుగా, బిన్‌వాక్ మొత్తం ఫైల్‌ను స్కాన్ చేస్తుంది. అదనంగా, బిన్‌వాక్ చిత్రంలో కనిపించే ఫైల్‌లను సంగ్రహించగలదు.

సాధన file и binwalk లైబ్రరీని ఉపయోగించండి libmagic ఫైల్ సంతకాలను గుర్తించడానికి. కానీ binwalk కంప్రెస్డ్/జిప్ చేయబడిన ఫైల్‌లు, ఫర్మ్‌వేర్ హెడర్‌లు, లైనక్స్ కెర్నలు, బూట్‌లోడర్‌లు, ఫైల్‌సిస్టమ్‌లు మొదలైన వాటి కోసం శోధించడానికి అనుకూల మ్యాజిక్ సంతకాల జాబితాకు అదనంగా మద్దతు ఇస్తుంది.

కాస్త ఆనందించాలా?

బిన్వాక్ సంస్థాపన

Linux, OSX, FreeBSD మరియు Windowsతో సహా బహుళ ప్లాట్‌ఫారమ్‌లలో Binwalkకి మద్దతు ఉంది.

బిన్‌వాక్ యొక్క తాజా వెర్షన్‌ను ఇన్‌స్టాల్ చేయడానికి మీరు చేయవచ్చు సోర్స్ కోడ్‌ని డౌన్‌లోడ్ చేయండి మరియు అనుసరించండి సంస్థాపన సూచనలు లేదా శీఘ్ర గైడ్, ప్రాజెక్ట్ వెబ్‌సైట్‌లో అందుబాటులో ఉంది.

Binwalk అనేక విభిన్న పారామితులను కలిగి ఉంది:

$ binwalk

Binwalk v2.2.0
Craig Heffner, ReFirmLabs
https://github.com/ReFirmLabs/binwalk

Usage: binwalk [OPTIONS] [FILE1] [FILE2] [FILE3] ...

Signature Scan Options:
    -B, --signature              Scan target file(s) for common file signatures
    -R, --raw=<str>              Scan target file(s) for the specified sequence of bytes
    -A, --opcodes                Scan target file(s) for common executable opcode signatures
    -m, --magic=<file>           Specify a custom magic file to use
    -b, --dumb                   Disable smart signature keywords
    -I, --invalid                Show results marked as invalid
    -x, --exclude=<str>          Exclude results that match <str>
    -y, --include=<str>          Only show results that match <str>

Extraction Options:
    -e, --extract                Automatically extract known file types
    -D, --dd=<type:ext:cmd>      Extract <type> signatures, give the files an extension of <ext>, and execute <cmd>
    -M, --matryoshka             Recursively scan extracted files
    -d, --depth=<int>            Limit matryoshka recursion depth (default: 8 levels deep)
    -C, --directory=<str>        Extract files/folders to a custom directory (default: current working directory)
    -j, --size=<int>             Limit the size of each extracted file
    -n, --count=<int>            Limit the number of extracted files
    -r, --rm                     Delete carved files after extraction
    -z, --carve                  Carve data from files, but don't execute extraction utilities
    -V, --subdirs                Extract into sub-directories named by the offset

Entropy Options:
    -E, --entropy                Calculate file entropy
    -F, --fast                   Use faster, but less detailed, entropy analysis
    -J, --save                   Save plot as a PNG
    -Q, --nlegend                Omit the legend from the entropy plot graph
    -N, --nplot                  Do not generate an entropy plot graph
    -H, --high=<float>           Set the rising edge entropy trigger threshold (default: 0.95)
    -L, --low=<float>            Set the falling edge entropy trigger threshold (default: 0.85)

Binary Diffing Options:
    -W, --hexdump                Perform a hexdump / diff of a file or files
    -G, --green                  Only show lines containing bytes that are the same among all files
    -i, --red                    Only show lines containing bytes that are different among all files
    -U, --blue                   Only show lines containing bytes that are different among some files
    -u, --similar                Only display lines that are the same between all files
    -w, --terse                  Diff all files, but only display a hex dump of the first file

Raw Compression Options:
    -X, --deflate                Scan for raw deflate compression streams
    -Z, --lzma                   Scan for raw LZMA compression streams
    -P, --partial                Perform a superficial, but faster, scan
    -S, --stop                   Stop after the first result

General Options:
    -l, --length=<int>           Number of bytes to scan
    -o, --offset=<int>           Start scan at this file offset
    -O, --base=<int>             Add a base address to all printed offsets
    -K, --block=<int>            Set file block size
    -g, --swap=<int>             Reverse every n bytes before scanning
    -f, --log=<file>             Log results to file
    -c, --csv                    Log results to file in CSV format
    -t, --term                   Format output to fit the terminal window
    -q, --quiet                  Suppress output to stdout
    -v, --verbose                Enable verbose output
    -h, --help                   Show help output
    -a, --finclude=<str>         Only scan files whose names match this regex
    -p, --fexclude=<str>         Do not scan files whose names match this regex
    -s, --status=<int>           Enable the status server on the specified port

చిత్రం స్కానింగ్

చిత్రం లోపల ఫైల్ సంతకాల కోసం శోధించడం ద్వారా ప్రారంభిద్దాం (సైట్ నుండి చిత్రం టిపి-లింక్).

--సిగ్నేచర్ పారామీటర్‌తో బిన్‌వాక్‌ను అమలు చేస్తోంది:

$ binwalk --signature --term archer-c7.bin

DECIMAL       HEXADECIMAL     DESCRIPTION
------------------------------------------------------------------------------------------
21876         0x5574          U-Boot version string, "U-Boot 1.1.4-g4480d5f9-dirty (May
                              20 2019 - 18:45:16)"
21940         0x55B4          CRC32 polynomial table, big endian
23232         0x5AC0          uImage header, header size: 64 bytes, header CRC:
                              0x386C2BD5, created: 2019-05-20 10:45:17, image size:
                              41162 bytes, Data Address: 0x80010000, Entry Point:
                              0x80010000, data CRC: 0xC9CD1E38, OS: Linux, CPU: MIPS,
                              image type: Firmware Image, compression type: lzma, image
                              name: "u-boot image"
23296         0x5B00          LZMA compressed data, properties: 0x5D, dictionary size:
                              8388608 bytes, uncompressed size: 97476 bytes
64968         0xFDC8          XML document, version: "1.0"
78448         0x13270         uImage header, header size: 64 bytes, header CRC:
                              0x78A267FF, created: 2019-07-26 07:46:14, image size:
                              1088500 bytes, Data Address: 0x80060000, Entry Point:
                              0x80060000, data CRC: 0xBB9D4F94, OS: Linux, CPU: MIPS,
                              image type: Multi-File Image, compression type: lzma,
                              image name: "MIPS OpenWrt Linux-3.3.8"
78520         0x132B8         LZMA compressed data, properties: 0x6D, dictionary size:
                              8388608 bytes, uncompressed size: 3164228 bytes
1167013       0x11CEA5        Squashfs filesystem, little endian, version 4.0,
                              compression:xz, size: 14388306 bytes, 2541 inodes,
                              blocksize: 65536 bytes, created: 2019-07-26 07:51:38
15555328      0xED5B00        gzip compressed data, from Unix, last modified: 2019-07-26
                              07:51:41

ఇప్పుడు ఈ చిత్రం గురించి మాకు చాలా సమాచారం ఉంది.

చిత్రం ఉపయోగాలు జలాంతర్గామి బూట్‌లోడర్‌గా (చిత్రం హెడర్ వద్ద 0x5AC0 మరియు వద్ద కంప్రెస్డ్ బూట్‌లోడర్ ఇమేజ్ 0x5B00) 0x13270 వద్ద ఉన్న uImage హెడర్ ఆధారంగా, ప్రాసెసర్ ఆర్కిటెక్చర్ MIPS అని మరియు Linux కెర్నల్ వెర్షన్ 3.3.8 అని మాకు తెలుసు. మరియు చిరునామాలో కనిపించే చిత్రం ఆధారంగా 0x11CEA5, మనం దానిని చూడవచ్చు rootfs ఫైల్ సిస్టమ్ squashfs.

ఇప్పుడు కమాండ్‌ని ఉపయోగించి బూట్‌లోడర్ (U-Boot)ని సంగ్రహిద్దాం dd:

$ dd if=archer-c7.bin of=u-boot.bin.lzma bs=1 skip=23296 count=41162
41162+0 records in
41162+0 records out
41162 bytes (41 kB, 40 KiB) copied, 0,0939608 s, 438 kB/s

చిత్రం LZMAని ఉపయోగించి కుదించబడినందున, మనం దానిని విడదీయాలి:

$ unlzma u-boot.bin.lzma

ఇప్పుడు మనకు U-బూట్ ఇమేజ్ ఉంది:

$ ls -l u-boot.bin
-rw-rw-r-- 1 sprado sprado 97476 Fev  5 08:48 u-boot.bin

డిఫాల్ట్ విలువను కనుగొనడం ఎలా bootargs?

$ strings u-boot.bin | grep bootargs
bootargs
bootargs=console=ttyS0,115200 board=AP152 rootfstype=squashfs init=/etc/preinit mtdparts=spi0.0:128k(factory-uboot),192k(u-boot),64k(ART),1536k(uImage),14464k@0x1e0000(rootfs) mem=128M

U-బూట్ ఎన్విరాన్మెంట్ వేరియబుల్ bootargs Linux కెర్నల్‌కు పారామితులను పాస్ చేయడానికి ఉపయోగిస్తారు. మరియు పైన పేర్కొన్నదాని నుండి, మేము పరికరం యొక్క ఫ్లాష్ మెమరీని బాగా అర్థం చేసుకున్నాము.

Linux కెర్నల్ ఇమేజ్‌ని సంగ్రహించడం ఎలా?

$ dd if=archer-c7.bin of=uImage bs=1 skip=78448 count=1088572
1088572+0 records in
1088572+0 records out
1088572 bytes (1,1 MB, 1,0 MiB) copied, 1,68628 s, 646 kB/s

కమాండ్ ఉపయోగించి చిత్రం విజయవంతంగా సంగ్రహించబడిందో లేదో మనం తనిఖీ చేయవచ్చు file:

$ file uImage
uImage: u-boot legacy uImage, MIPS OpenWrt Linux-3.3.8, Linux/MIPS, Multi-File Image (lzma), 1088500 bytes, Fri Jul 26 07:46:14 2019, Load Address: 0x80060000, Entry Point: 0x80060000, Header CRC: 0x78A267FF, Data CRC: 0xBB9D4F94

uImage ఫైల్ ఫార్మాట్ ప్రాథమికంగా అదనపు హెడర్‌తో కూడిన Linux కెర్నల్ ఇమేజ్. చివరి Linux కెర్నల్ ఇమేజ్‌ని పొందడానికి ఈ హెడర్‌ని తీసివేద్దాం:

$ dd if=uImage of=Image.lzma bs=1 skip=72
1088500+0 records in
1088500+0 records out
1088500 bytes (1,1 MB, 1,0 MiB) copied, 1,65603 s, 657 kB/s

చిత్రం కంప్రెస్ చేయబడింది, కాబట్టి దాన్ని అన్‌ప్యాక్ చేద్దాం:

$ unlzma Image.lzma

ఇప్పుడు మనకు Linux కెర్నల్ ఇమేజ్ ఉంది:

$ ls -la Image
-rw-rw-r-- 1 sprado sprado 3164228 Fev  5 10:51 Image

కెర్నల్ ఇమేజ్‌తో మనం ఏమి చేయవచ్చు? ఉదాహరణకు, మనం చిత్రంలో స్ట్రింగ్ సెర్చ్ చేసి, Linux కెర్నల్ వెర్షన్‌ని కనుగొనవచ్చు మరియు కెర్నల్‌ను రూపొందించడానికి ఉపయోగించే పర్యావరణం గురించి తెలుసుకోవచ్చు:

$ strings Image | grep "Linux version"
Linux version 3.3.8 (leo@leo-MS-7529) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Mon May 20 18:53:02 CST 2019

ఫర్మ్‌వేర్ గత సంవత్సరం (2019) విడుదలైనప్పటికీ, నేను ఈ కథనాన్ని వ్రాసేటప్పుడు ఇది 3.3.8లో విడుదలైన Linux కెర్నల్ (2012) యొక్క పాత వెర్షన్‌ను ఉపయోగిస్తోంది, 4.6 నుండి GCC (2012) యొక్క చాలా పాత వెర్షన్‌తో సంకలనం చేయబడింది. !
(సుమారుగా. అనువాదం. మీరు ఇప్పటికీ కార్యాలయంలో మరియు ఇంట్లో మీ రూటర్‌లను విశ్వసిస్తున్నారా?)

ఎంపికతో --opcodes మేము మెషిన్ సూచనలను చూసేందుకు మరియు చిత్రం యొక్క ప్రాసెసర్ నిర్మాణాన్ని నిర్ణయించడానికి బిన్‌వాక్‌ని కూడా ఉపయోగించవచ్చు:

$ binwalk --opcodes Image
DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
2400          0x960           MIPS instructions, function epilogue
2572          0xA0C           MIPS instructions, function epilogue
2828          0xB0C           MIPS instructions, function epilogue

రూట్ ఫైల్ సిస్టమ్ గురించి ఏమిటి? చిత్రాన్ని మాన్యువల్‌గా ఎక్స్‌ట్రాక్ట్ చేయడానికి బదులుగా, ఎంపికను ఉపయోగించుకుందాం binwalk --extract:

$ binwalk --extract --quiet archer-c7.bin

పూర్తి రూట్ ఫైల్‌సిస్టమ్ ఉప డైరెక్టరీకి సంగ్రహించబడుతుంది:

$ cd _archer-c7.bin.extracted/squashfs-root/

$ ls
bin  dev  etc  lib  mnt  overlay  proc  rom  root  sbin  sys  tmp  usr  var  www

$ cat etc/banner
     MM           NM                    MMMMMMM          M       M
   $MMMMM        MMMMM                MMMMMMMMMMM      MMM     MMM
  MMMMMMMM     MM MMMMM.              MMMMM:MMMMMM:   MMMM   MMMMM
MMMM= MMMMMM  MMM   MMMM       MMMMM   MMMM  MMMMMM   MMMM  MMMMM'
MMMM=  MMMMM MMMM    MM       MMMMM    MMMM    MMMM   MMMMNMMMMM
MMMM=   MMMM  MMMMM          MMMMM     MMMM    MMMM   MMMMMMMM
MMMM=   MMMM   MMMMMM       MMMMM      MMMM    MMMM   MMMMMMMMM
MMMM=   MMMM     MMMMM,    NMMMMMMMM   MMMM    MMMM   MMMMMMMMMMM
MMMM=   MMMM      MMMMMM   MMMMMMMM    MMMM    MMMM   MMMM  MMMMMM
MMMM=   MMMM   MM    MMMM    MMMM      MMMM    MMMM   MMMM    MMMM
MMMM$ ,MMMMM  MMMMM  MMMM    MMM       MMMM   MMMMM   MMMM    MMMM
  MMMMMMM:      MMMMMMM     M         MMMMMMMMMMMM  MMMMMMM MMMMMMM
    MMMMMM       MMMMN     M           MMMMMMMMM      MMMM    MMMM
     MMMM          M                    MMMMMMM        M       M
       M
 ---------------------------------------------------------------
   For those about to rock... (%C, %R)
 ---------------------------------------------------------------

ఇప్పుడు మనం చాలా విభిన్నమైన పనులు చేయవచ్చు.

మేము కాన్ఫిగరేషన్ ఫైల్‌లు, పాస్‌వర్డ్ హ్యాష్‌లు, క్రిప్టోగ్రాఫిక్ కీలు మరియు డిజిటల్ సర్టిఫికేట్‌ల కోసం శోధించవచ్చు. మేము బైనరీ ఫైళ్లను విశ్లేషించవచ్చు సమస్య పరిష్కరించు మరియు దుర్బలత్వాలు.

సహాయంతో qemu и chroot మనం చిత్రం నుండి ఎక్జిక్యూటబుల్‌ని కూడా అమలు చేయవచ్చు (అనుకరణ చేయవచ్చు):

$ ls
bin  dev  etc  lib  mnt  overlay  proc  rom  root  sbin  sys  tmp  usr  var  www

$ cp /usr/bin/qemu-mips-static .

$ sudo chroot . ./qemu-mips-static bin/busybox
BusyBox v1.19.4 (2019-05-20 18:13:49 CST) multi-call binary.
Copyright (C) 1998-2011 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: busybox --list[-full]
   or: function [arguments]...

    BusyBox is a multi-call binary that combines many common Unix
    utilities into a single executable.  Most people will create a
    link to busybox for each function they wish to use and BusyBox
    will act like whatever it was invoked as.

Currently defined functions:
    [, [[, addgroup, adduser, arping, ash, awk, basename, cat, chgrp, chmod, chown, chroot, clear, cmp, cp, crond, crontab, cut, date, dd, delgroup, deluser, dirname, dmesg, echo, egrep, env, expr, false,
    fgrep, find, free, fsync, grep, gunzip, gzip, halt, head, hexdump, hostid, id, ifconfig, init, insmod, kill, killall, klogd, ln, lock, logger, ls, lsmod, mac_addr, md5sum, mkdir, mkfifo, mknod, mktemp,
    mount, mv, nice, passwd, pgrep, pidof, ping, ping6, pivot_root, poweroff, printf, ps, pwd, readlink, reboot, reset, rm, rmdir, rmmod, route, sed, seq, sh, sleep, sort, start-stop-daemon, strings,
    switch_root, sync, sysctl, tail, tar, tee, telnet, test, tftp, time, top, touch, tr, traceroute, true, udhcpc, umount, uname, uniq, uptime, vconfig, vi, watchdog, wc, wget, which, xargs, yes, zcat

గొప్ప! అయితే BusyBox వెర్షన్ 1.19.4 అని దయచేసి గమనించండి. ఇది BusyBox యొక్క చాలా పాత వెర్షన్, ఏప్రిల్ 2012లో విడుదలైంది.

కాబట్టి TP-Link 2019 నుండి సాఫ్ట్‌వేర్ (GCC టూల్‌చెయిన్, కెర్నల్, బిజీబాక్స్ మొదలైనవి) ఉపయోగించి 2012లో ఫర్మ్‌వేర్ చిత్రాన్ని విడుదల చేస్తుంది!

నేను ఎల్లప్పుడూ నా రూటర్‌లలో OpenWRTని ఎందుకు ఇన్‌స్టాల్ చేస్తున్నాను అని ఇప్పుడు మీకు అర్థమైందా?

అంతే కాదు

బిన్‌వాక్ కూడా ఎంట్రోపీ విశ్లేషణ చేయగలదు, ముడి ఎంట్రోపీ డేటాను ముద్రించగలదు మరియు ఎంట్రోపీ గ్రాఫ్‌లను రూపొందించగలదు. సాధారణంగా, ఇమేజ్‌లోని బైట్‌లు యాదృచ్ఛికంగా ఉన్నప్పుడు ఎక్కువ ఎంట్రోపీని గమనించవచ్చు. చిత్రం ఎన్‌క్రిప్టెడ్, కంప్రెస్డ్ లేదా అస్పష్టమైన ఫైల్‌ని కలిగి ఉందని దీని అర్థం. హార్డ్‌కోర్ ఎన్‌క్రిప్షన్ కీ? ఎందుకు కాదు.

బిన్‌వాక్‌ని ఉపయోగించి ఇంటి రూటర్‌ను రివర్స్ ఇంజనీరింగ్ చేయండి. మీరు మీ రూటర్ సాఫ్ట్‌వేర్‌ను విశ్వసిస్తున్నారా?

మేము పరామితిని కూడా ఉపయోగించవచ్చు --raw చిత్రం లేదా పారామీటర్‌లో కస్టమ్ రా బైట్ క్రమాన్ని కనుగొనడానికి --hexdump రెండు లేదా అంతకంటే ఎక్కువ ఇన్‌పుట్ ఫైల్‌లను పోల్చి హెక్స్ డంప్ చేయడానికి.

అనుకూల సంతకాలు పారామీటర్‌ని ఉపయోగించి కమాండ్ లైన్‌లో పేర్కొన్న కస్టమ్ సిగ్నేచర్ ఫైల్ ద్వారా బిన్‌వాక్‌కి జోడించబడవచ్చు --magic, లేదా వాటిని డైరెక్టరీకి జోడించడం ద్వారా $ HOME / .config / binwalk / magic.

మీరు binwalk గురించి మరింత సమాచారాన్ని ఇక్కడ కనుగొనవచ్చు అధికారిక డాక్యుమెంటేషన్.

బిన్‌వాక్ పొడిగింపు

అక్కడ ఉంది API బిన్‌వాక్, ఒక పైథాన్ మాడ్యూల్‌గా అమలు చేయబడుతుంది, ఇది బిన్‌వాక్ స్కాన్‌ను ప్రోగ్రామాటిక్‌గా నిర్వహించడానికి ఏదైనా పైథాన్ స్క్రిప్ట్ ద్వారా ఉపయోగించవచ్చు మరియు బిన్‌వాక్ కమాండ్ లైన్ యుటిలిటీని కేవలం రెండు లైన్ల పైథాన్ కోడ్‌తో దాదాపు పూర్తిగా నకిలీ చేయవచ్చు!

import binwalk
binwalk.scan()

పైథాన్ APIని ఉపయోగించి మీరు కూడా సృష్టించవచ్చు పైథాన్ ప్లగిన్‌లు బిన్‌వాక్‌ను కాన్ఫిగర్ చేయడానికి మరియు విస్తరించడానికి.

కూడా ఉంది IDA ప్లగ్ఇన్ మరియు క్లౌడ్ వెర్షన్ బిన్‌వాక్ ప్రో.

కాబట్టి మీరు ఇంటర్నెట్ నుండి ఫర్మ్‌వేర్ చిత్రాన్ని డౌన్‌లోడ్ చేసి, బిన్‌వాక్‌ని ఎందుకు ప్రయత్నించకూడదు? మీరు చాలా ఆనందిస్తారని నేను వాగ్దానం చేస్తున్నాను :)

మూలం: www.habr.com

ఒక వ్యాఖ్యను జోడించండి