上周入手一塊Proxmark III裸板+官方HF天線。為了防靜電,到電子市場去淘了一個尺寸相當的塑料盒子,自己打孔DIY了一個外殼。

官方天線有點坑爹,價格貴不說,電壓只有7.8V。Proxmark wiki上有制作HF天線的簡單教程,打算自己照著做一根。Hirose接口其實就是Mini USB 4Pin雙槽口,這種接口在國內用得較少。因為USB線材的品質、繞線的直徑及圈數對天線電壓都有影響,所以要提高電壓,需使用質量較好的線材,輔以能夠方便調整直徑和圈數的方法。下面給出我的制作過程:
1)選一根質量較好(芯線較粗)的USB線(也就3元),去其兩端后保證1米長;
2)選一端剝出長約2cm的芯線;
3)USB芯線有四股,任選兩根剝掉一段,焊接到Mini USB 4Pin公口;

4)焊接好后,將工口的金屬外殼套上,用電工膠布纏繞穩固;
5)剝去從Mini USB口頭部開始6.5cm之后的外皮,去掉屏蔽網和錫箔,剪掉未使用的兩個芯線;
6)選取一根芯線保留從Mini USB口頭部開始的25cm,另外一根保留至80cm;
7)將兩線連接起來(不要焊死),繞成3圈線圈后用尼龍扎帶固定(不要扎死);
8)使用hf tune命令tune電壓。如果此時電壓在7-8V,進行下一步,如果已經達到12+V,那么恭喜你已經一步到位;
9)收縮線圈,減小直徑,但保證圈數在3圈,且短線是一圈周長的一半。如果電壓有明顯提高,剪掉多余的線,直至電壓開始回落;
10)得到目標電壓后,扎死線圈,焊接好兩線接頭。

由于Mini USB 4Pin接頭是自己焊接的,電壓很有可能達不到13V,不過肯定可以達到12V。如果你手上有Hirose接口的線,用以上步驟應該可以調出13V的天線。

最近更新的source code中已經將Darkside attack代碼集成進來,測試了一下可以在3分鐘以內獲得1k卡的一個KEY。對于有些卡工作異常的原因,我從論壇找到的解釋是:
To be precise, it all depends on the card. There are older MIFARE Classic cards from NXP where the nonce is better predictable than in the newer once. Furthermore, there are cards manufactured by Infineon, where the MIFARE Classic random numbers are even less random than those from NXP. For a card where a random can be pinned stable on producing the same one over and over, it all just takes around a few seconds. But with just a few "missers" you easily scale up to a few minutes. It all depends on the setup and the cards. But I think it is safe to say that you can get the key from a regular (older) oyster card with a proxmark in around 3 minutes.
Note: If you want to verify, make sure you have a (13v+ antenna) and play around with distance between the card and antenna. It could help if you just put a boring (read thick) book in between。
另外,這幾天做了幾個有趣的實驗,有些功能還需要DIY一下,比如standalone模式下的simulation、sniffing、外部供電等等。
在Windows平臺build時,mkversion.pl腳本在提取svn版本信息時對回車換行的處理上有問題,會導致構建失敗,需要fix一下:
if(open(SVNINFO, "svn info $main_dir|")) {
while(<SVNINFO>) {
if (/^Last Changed Rev: (.*)/) {
$present = 1;
$svnversion = $1;
## last; # Do not abort here, since SVN tends to complain about a Broken pipe
}
}
改為:
if(open(SVNINFO, "svn info $main_dir|")) {
while(<SVNINFO>) {
if (/^Last Changed Rev: ([^\n\s]*)/) {
$present = 1;
$svnversion = $1;
## last; # Do not abort here, since SVN tends to complain about a Broken pipe
}
}