
Ethereumネットワーク上でブロブファイルを検索・抽出するためのツールで、Etherscan.io APIを使用します。

EtherBlob Explorerは、研究者、アナリスト、CTFプレイヤー、あるいはEthereumブロックチェーンネットワーク上のさまざまな種類のファイルや人間が提供する意味のあるデータを検索したい好奇心旺盛な人のためのツールです。ユーザーが指定したブロックIDまたはUNIXタイムスタンプの範囲を、利用可能な5つのネットワーク(MainNet、Görli、Kovan、Rinkeby、Ropsten)のいずれかで検索します。
実際の事例としては、2017年に行われたこの実験をご覧ください。ブロックチェーンの不変性はまさに諸刃の剣となり得ます。
以下のコマンドを実行してください:
$ pip install git+https://github.com/litneet64/etherblob-explorer.git
これでCLIから使用できるようになりました。以下に一般的な使用例を示します!
以下の5つのEthereumネットワークのいずれかで検索します:
このツールは以下の場所を個別に、または同一実行で任意に組み合わせて検索できます:
[*] Ethereumネットワークでは、関連するアカウントキーを持たないアドレスに送信する場合の検証がないため、'to'アドレスにデータを保存することが可能です。つまり、任意のアドレスにトランザクションを行い、複数の20バイトサイズのトランザクションにわたってペイロードを作成できます(非常に稀ですが、一部のCTFチャレンジも同様です)。
これらのメソッドはすべて個別に、または任意の組み合わせで使用できます:
binwalkを使用してデータ内に埋め込まれたファイルを検索。fileを利用してヘッダー+マジックバイトで検索(デフォルトメソッド)。重要: ここに示された順序は内部で他のメソッドによる検索を破棄するために使用されます(例えば、埋め込みファイルでファイルが見つかった場合、ファイルヘッダー、ASCII文字列ダンプ、エントロピーを使用した検索は試みられません)。これは、以前のメソッドが既に成功した場合に有意義なものを見つける可能性が低いためです。
-h)にあります!.api-key)、以下の2つのブロックID間(両端含む):$ etherblob 4081599 4081600
$ etherblob -K api.key 3134050 3145570 -M -H --network goerli
$ etherblob 4081599 4081600 --blocks --transactions -D extracted/
2021年1月25日19:00:00から2021年1月26日19:00:00の間にコミットされたブロックの範囲内で、'to'アドレス内のみ検索:$ etherblob -t 1611601200 1611687600 --addresses
$ etherblob 3911697 3912697 -S --contracts -C 4
$ etherblob 4081599 4081600 --encrypted
$ etherblob 3911697 3912697 -E 4.0 5.0 -s
$ etherblob -t 1608836400 1608922800 --blocks --transactions --strings
$ etherblob 4081599 4081600 -U -S -M -H --blocks --transactions --addresses --contracts
高度な使用例やそれらで見つかったものについては、wikiで詳しく説明されています!
usage: etherblob [-h] [--transactions] [--blocks] [--addresses] [--contracts]
[--network {main,goerli,kovan,rinkeby,ropsten}] [-H] [-M] [-U] [-E CUSTOM_ENTROPY CUSTOM_ENTROPY]
[--encrypted] [-S] [-C CONTRACT_POSITION] [-t] [-K API_KEY_PATH] [-k API_KEY] [-D OUTPUT_DIR]
[-o OUT_LOG] [-s] [-i [IGNORED_FMT [IGNORED_FMT ...]]] [--version]
start_block end_block
Tool to search and extract blob files on the Ethereum Network.
positional arguments:
start_block Start of block id range.
end_block End of block id range.
optional arguments:
-h, --help show this help message and exit
--transactions Search for blob files on transaction inputs. Default search mode.
--blocks Search for blob files on block inputs. If enabled then transaction input check is disabled unless
explicitly enabled.
--addresses Search for blob files on 'to' transaction addresses, as on Ethereum anyone can make transactions
to an arbitrary address even if it has no related owner (still not very common). If enabled then
transaction's input check is disabled unless explicitly enabled.
--contracts Search for blob files on contract's storage. If enabled then transaction input check is disabled
unless explicitly enabled.
--network {main,goerli,kovan,rinkeby,ropsten}, -N {main,goerli,kovan,rinkeby,ropsten}
Choose blockchain network to search in. Available choices are Main, Goerli (Görli), Kovan, Rinkeby
and Ropsten. MainNet is the default network. Case-insensitive.
-H, --file-header If enabled, search for file formats via magic bytes/file headers on data (from blocks,
transactions or addresses). Enabled by default unless another method is enabled too.
-M, --embedded If enabled, search for embedded files on data (from blocks, transactions or addresses) via
binwalk. Disabled by default as parsing now takes longer.
-U, --unicode If enabled, attempt to search and dump files containing UTF-8 text from harvested data (blocks,
transactions, addresses) using Shannon's Entropy (between 3.5 and 5.0) if no other discernible
file is found first on that data. Yields many false positives.
-E CUSTOM_ENTROPY CUSTOM_ENTROPY, --custom-entropy CUSTOM_ENTROPY CUSTOM_ENTROPY
Define your own entropy limits (min and max) to search for files/data on harvested data.
--encrypted If enabled, attempt to search and dump encrypted/compressed data found via different search
methods (blocks, transactions, addresses) using Shannon's Entropy (between 7.0 and 8.0) if no
other discernible file is found first on that data.
-S, --strings If enabled, attempt to search and dump ASCII strings into files found inside harvested data
(blocks, transactions, addresses) if no other discernible file is found first on that data.
-C CONTRACT_POSITION, --contract-position CONTRACT_POSITION
Search inside contract's data until reaching the (N-1)th position on its storage array. Positions
contain 32 bytes worth of data. Count starts at 0 and default pos is the 15th pos (16 indexes in
total) if no custom position is given.
-t, --timestamps If enabled, then start and end block IDs are interpreted as UNIX timestamps that are then resolved
to the closest commited blocks for those specific times.
-K API_KEY_PATH, --api-key-path API_KEY_PATH
Path to file with Etherscan API key for queries. Default search location is '.api-key'.
-k API_KEY, --api-key API_KEY
Etherscan API key as parameter. If given then '--api-key-path' is ignored.
-D OUTPUT_DIR, --output-dir OUTPUT_DIR
Out-dir for extracted files. Default is 'ext_{start block}-{end block}'.
-o OUT_LOG, --out-log OUT_LOG
Out-file for logs. Default is 'etherblob_{start block}-{end block}.log'.
-s, --save-transactions
If enabled, all transactions and their info are stored at file 'transactions_{start-block}-{end-
block}.txt'
-i [IGNORED_FMT [IGNORED_FMT ...]], --ignored-fmt [IGNORED_FMT [IGNORED_FMT ...]]
Ignored file formats for extraction. Default ignored/common file formats are 'ISO-8859 text' and
'Non-ISO extended-ASCII text'. The 'data' file format is always ignored. Accepts file format
substrings and makes case-insensitive matches. '*' is a wildcard to ignore all file formats.
--version show program's version number and exit
Official GitHub repo 'https://github.com/litneet64/etherblob-explorer'