上周入手一块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
}
}