Research, development and trades concerning the powerful Proxmark3 device.
Remember; sharing is caring. Bring something back to the community.
"Learn the tools of the trade the hard way." +Fravia
Time changes and with it the technology
Proxmark3 @ discord
Users of this forum, please be aware that information stored on this site is not private.
Thanking for merlok, I'm begining my research on my own PM3!
The original PM3 Stand-Alone Mode is just for recording and simulating 125K cards.But my study focusing on Mifare Classic 1K.So I tried to edit the code to perform some useful function ,such as simulating a fixed UID , sniffing and recording-replaying UID in stand-alone mode.My code as below:
File:appmain.c
#ifdef WITH_LF
// Nemer's sniff and repeat routine
void NemerRun()
{
DbpString("Nemer's Stand-alone mode! No PC necessary.");
// 3 possible options:1-simulate a fixed uid;2-siffer;3-recording-replaying
unsigned int lo=0;
uint8_t cuid[4]={ 0x00,0x00,0x00,0x00 };;
int select=0;
int opt=3;
int uid[4]={0x2E,0x8C,0x80,0x38};
int respon=0;
LED(LED_RED, 200);
LED(LED_ORANGE, 200);
LED(LED_GREEN, 200);
LED(LED_ORANGE, 200);
LED(LED_RED, 200);
for(;;)
{
LEDsoff();
LED(1<<(select),0);
int button_pressed = BUTTON_HELD(1000);
SpinDelay(300);
if (button_pressed > 0) //hold the button for 1s to run selected mode
{
if (select==0) //mode 1:simulating a fixed uid
{
LEDsoff();
for(int i=0;i<4;i++)
{
lo=lo|(uid[i]&0xff);
if (i<3)
{
lo=lo<<8;
}
}
while(BUTTON_PRESS())
WDT_HIT();
SpinDelay(500);
Dbprintf("Simulating %x %x %x %x", uid[0],uid[1],uid[2],uid[3]);
SimulateIso14443aTag(lo);
Dbprintf("Simulating Done");
// Turn on selected LED
return;
}
else if(select==1) //mode 2:sniffing
{
LEDsoff();
Dbprintf("Snooping");
while(BUTTON_PRESS())
WDT_HIT();
SpinDelay(500);
SnoopIso14443a();
Dbprintf("Snooping Done");
return;
}
else //mode 3:recording-replaying
{
LEDsoff();
while(BUTTON_PRESS())
WDT_HIT();
SpinDelay(500);
respon=iso14443a_select_card(cuid,NULL,NULL);
Dbprintf("Recorded %x %x %x %x", cuid[0],cuid[1],cuid[2],cuid[3]);
for(int i=0;i<4;i++)
{
lo=lo|(cuid[i]&0xff);
if (i<3)
{
lo=lo<<8;
}
}
while(BUTTON_PRESS())
WDT_HIT();
SpinDelay(500);
Dbprintf("Simulating %x %x %x %x", cuid[0],cuid[1],cuid[2],cuid[3]);
SimulateIso14443aTag(lo);
Dbprintf("Simulating Done");
// Turn on selected LED
return;
}
}
else if(button_pressed) //click button to switch mode
{
select++;
select=select%opt;
}
}
}
#endif
There is a problem in the codes above and make me crying!!! when I wanna to record a new card's uid ,the PM3 always hung up...But,if I use "hf 14a reader" to read a uid first,and then press button on PM3 to run the stand-alone mode 3,it works...I have no idea why this happon.Who can help me !!! Come dude,fix my bugs...
uid array must be 8 bytes long
P.S. as for my full emulation of mifare card - i will start working at the end of next week (after completed code for nested auth).
Last edited by merlok (2011-06-05 08:15:55)
Let me know if you get the bugs worked out, I just finished a portable proxmark (http://www.proxmark.org/forum/viewtopic.php?id=858) and would love some standalone HF modes so I can replace the thick LF antenna.
I mostly do hardware but when I get some time, I'll try to take a look at the code.