Commit graph

4145 commits

Author SHA1 Message Date
iceman1001 4ccdc189bd Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-07-28 20:41:54 +02:00
Iceman b82c2f85e4 Update README.md 2016-07-28 18:38:20 +02:00
iceman1001 1f1d974f02 CHG: added a comment 2016-07-23 18:33:30 +02:00
iceman1001 2de9622f0e CHG: some clearing of memory 2016-07-23 18:31:20 +02:00
Iceman a273fcfda2 Merge pull request #14 from k02a/patch-2
Addition of depending library flags...
2016-07-22 22:57:28 +02:00
Iceman 517f8f84e4 Merge pull request #13 from k02a/patch-1
Improved compilation compability on Linux
2016-07-22 22:55:00 +02:00
k02a 39814f19ab Addition of depending library flags...
Inclusion of termcap library or ncurses library solves the compilation errors on some Linux distributions, for example a currently updated Slackware Linux 14.2 x86_64 vanilla distribution (which I run).

Output:
bash-4.3# make -C proxmark3
[...]
g++ -DQT_SHARED -I/usr/lib64/qt/include/QtGui -I/usr/lib64/qt/include/QtCore -Wall -O3 obj/proxmark3.o obj/uart.o obj/util.o obj/sleep.o obj/nonce2key/crapto1.o obj/nonce2key/crypto1.o obj/nonce2key/nonce2key.o obj/nonce2key/crypto1_bs.o obj/loclass/cipher.o obj/loclass/cipherutils.o obj/loclass/des.o obj/loclass/ikeys.o obj/loclass/elite_crack.o obj/loclass/fileutils.o obj/mifarehost.o obj/parity.o obj/crc.o obj/crc16.o obj/crc64.o obj/iso14443crc.o obj/iso15693tools.o obj/data.o obj/graph.o obj/ui.o obj/cmddata.o obj/lfdemod.o obj/cmdanalyse.o obj/cmdhf.o obj/cmdhf14a.o obj/cmdhf14b.o obj/cmdhf15.o obj/cmdhfepa.o obj/cmdhflegic.o obj/cmdhficlass.o obj/cmdhfmf.o obj/cmdhfmfu.o obj/cmdhfmfhard.o obj/cmdhfmfdes.o obj/cmdhftopaz.o obj/cmdhw.o obj/cmdlf.o obj/cmdlfio.o obj/cmdlfhid.o obj/cmdlfawid.o obj/cmdlfem4x.o obj/cmdlfhitag.o obj/cmdlfti.o obj/cmdparser.o obj/cmdmain.o obj/cmdlft55xx.o obj/cmdlfpcf7931.o obj/cmdlfviking.o obj/cmdlfpresco.o obj/cmdlfpyramid.o obj/cmdlfguard.o obj/cmdlfnedap.o obj/pm3_binlib.o obj/scripting.o obj/cmdscript.o obj/pm3_bitlib.o obj/aes.o obj/protocols.o obj/sha1.o obj/sha256.o obj/cmdcrc.o obj/reveng/preset.o obj/reveng/reveng.o obj/reveng/cli.o obj/reveng/bmpbit.o obj/reveng/model.o obj/reveng/poly.o obj/reveng/getopt.o obj/tea.o obj/prng.o obj/radixsort.o obj/bucketsort.o obj/proxgui.o obj/proxguiqt.o obj/proxguiqt.moc.o -L/opt/local/lib -L/usr/local/lib -lreadline -lpthread -lm ../liblua/liblua.a -ldl -L/usr/lib64/qt/lib -lQtGui -lQtCore -o proxmark3
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetstr'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tputs'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `BC'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetent'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetflag'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgoto'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `UP'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetnum'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `PC'
collect2: fel: ld returnerade avslutningsstatus 1
Makefile:172: receptet för målet "proxmark3" misslyckades
make[1]: *** [proxmark3] Fel 1
make[1]: Lämnar katalogen "/home/github/iceman1001/proxmark3/client"
Makefile:12: receptet för målet "client/all" misslyckades
make: *** [client/all] Fel 2
make: Lämnar katalogen "/home/github/iceman1001/proxmark3"
2016-07-22 13:52:12 +02:00
k02a a360a90bb6 Improved compilation compability on Linux
Compilation of Lua on a currently updated Slackware Linux 14.2 x86_64 vanilla distribution will cause some errors, due to a missing flags in the Makefile. I noticed that adding the termcap library solves the problem.

I also found a thread (http://lua.2524044.n2.nabble.com/readline-termcap-ncurses-td5726148.html
) where other Linux distributions might have similar problems with Lua. Included version of liblua, derived from Lua 5.2.2, also seems to depend on the Termcap library and/or ncurses library.

Output:
bash-4.3$ make -C proxmark3
make: Går till katalogen "/home/github/iceman1001/proxmark3"
make -C client all
make[1]: Går till katalogen "/home/github/iceman1001/proxmark3/client"
Compiling liblua, using platform linux
cd ../liblua && make linux
make[2]: Går till katalogen "/home/github/iceman1001/proxmark3/liblua"
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[3]: Går till katalogen "/home/github/iceman1001/proxmark3/liblua"
gcc -O3 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX    -c -o lapi.o lapi.c
[...]
gcc -O3 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX    -c -o linit.o linit.c
ar rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o 
ranlib liblua.a
gcc -O3 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX    -c -o lua.o lua.c
gcc -o lua   lua.o liblua.a -lm -Wl,-E -ldl -lreadline 
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tputs'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgoto'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetflag'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `UP'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetent'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetnum'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `PC'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetstr'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `BC'
collect2: fel: ld returnerade avslutningsstatus 1
Makefile:63: receptet för målet "lua" misslyckades
make[3]: *** [lua] Fel 1
make[3]: Lämnar katalogen "/home/github/iceman1001/proxmark3/liblua"
Makefile:106: receptet för målet "linux" misslyckades
make[2]: *** [linux] Fel 2
make[2]: Lämnar katalogen "/home/github/iceman1001/proxmark3/liblua"
Makefile:203: receptet för målet "lua_build" misslyckades
make[1]: *** [lua_build] Fel 2
make[1]: Lämnar katalogen "/home/github/iceman1001/proxmark3/client"
Makefile:12: receptet för målet "client/all" misslyckades
make: *** [client/all] Fel 2
make: Lämnar katalogen "/home/github/iceman1001/proxmark3"
2016-07-22 13:40:05 +02:00
Iceman 24d6432831 Merge pull request #12 from k02a/patch-1
Inclusion of unused oem variable
2016-07-22 10:13:11 +02:00
k02a e13ccb6b3f Inclusion of unused oem variable
When compilation of the current source code, I am getting the warning of setting the unused variable "oem". I have included this, along with minor spelling corrections/language updates in the menu system.

gcc -std=c99 -O3 -mpopcnt -march=native -g -I. -I../include -I../common -I../zlib -I/opt/local/include -I../liblua -Wall -DHAVE_GUI -DZ_SOLO -DZ_PREFIX -DNO_GZIP -DZLIB_PM3_TUNED  -c -o obj/cmdlfhid.o cmdlfhid.c
cmdlfhid.c: I funktion "CmdHIDWiegand":
cmdlfhid.c:292:11: varning: variabeln "oem" sätts men används inte [-Wunused-but-set-variable]
  uint32_t oem;
           ^

Before:
pm3 --> lf hid wiegand 0 101 2001
HID 26 bit | FC: 101 CN: 2001 | Wiegand Code: 0000002004CA0FA2          
[...]
HID 40 bit | FC: 101 CN: 2001 | Wiegand Code: 0000000000000FA2

After:
pm3 --> lf hid wiegand 0 101 2001
HID 26 bit | OEM: 0 FC: 101 CN: 2001 | Wiegand code: 0000002004CA0FA2          
[...]
HID 40 bit | OEM: 0 FC: 101 CN: 2001 | Wiegand code: 0000000000000FA2
2016-07-22 09:49:02 +02:00
iceman1001 36e78d669c CHG: added some includes / libarys for HomeBrew AND QT5 compiling on MAC OSX. They are commented away, but if you need it replace the other two lines and uncomment.
All credit to @koalazak  [ref] ed1525805c
2016-07-21 17:26:17 +02:00
iceman1001 81ba7ee837 CHG: minor changes to code, mostly newlines, change a value to #DEFINE END_OF_LIST_MARKER
CHG: GOOD_BYTES_REQUIRED changed from 28 > 13,  makes it nonce collecting part faster, but the fail rate goes also up. its a value to fiddle with.
2016-07-20 12:02:08 +02:00
iceman1001 b9b480d081 chg: name error? 2016-07-07 10:01:50 +02:00
iceman1001 a8ee668770 CHG: moved includes into header file where it belong 2016-07-07 02:15:40 +02:00
iceman1001 e7470660c2 ADD: added the nonce_struct needed for @marshmellow42 's enhanced "sim x" attack. 2016-07-07 02:14:03 +02:00
iceman1001 0cbe0cb8d6 chg: changed comment 2016-07-07 02:13:02 +02:00
iceman1001 9d7e9935af syntax suger 2016-07-07 02:10:09 +02:00
iceman1001 2d1885f1d1 CHG: Now it prints the correct UID bytes etc. 2016-07-07 02:09:16 +02:00
iceman1001 0a856e292a CHG: adjusted the debug message to the correct mfkey32v2 with right number of parameters. 2016-06-22 09:35:18 +02:00
iceman1001 e0530dbcec Applied @icsom 's fixes from: b577582490 2016-06-22 09:33:21 +02:00
iceman1001 ac36c57789 FIX: this should fix the compilation error for MAC users. 2016-06-20 13:32:22 +02:00
iceman1001 3c61ee4338 chg: added to print the author. 2016-06-20 13:31:51 +02:00
iceman1001 180ec86ef0 @marshmellow42 's fix the AskEdgeDetect cleaning tool. de53156e1e 2016-06-20 13:26:45 +02:00
iceman1001 9686a8d4d5 @marshmellow42 's fix askAMP 16ea2b8ca3 2016-06-20 13:21:36 +02:00
iceman1001 f3cbb7bc7b CHG: wrong minor version value. 0x1 -> 0x0 for desfire ev1 detection 2016-06-15 09:22:55 +02:00
iceman1001 d118e70f5d CHG: Thanks to @Mackwa for looking up the expected Desfire EV2 major version byte. 2016-06-14 10:21:52 +02:00
iceman1001 5558d935bd ADD: added the skeleton for analysing dates in a given byte array. 2016-06-13 21:55:52 +02:00
iceman1001 288c6845a7 ADD: added some identification on between old Desfire, Desfire EV1 and Desfire EV2
DEL: removed two old des-commands files which wasn't used.
2016-06-13 19:05:50 +02:00
iceman1001 ddaecc0826 FIX: this corrects the bug when running "hardnested" serveral times a faulty wrongsized key is returned. Just needed to clear the variable every run. 2016-05-31 13:11:04 +02:00
Iceman 2605eca35a Merge pull request #8 from zhovner/master
Typo in hf 14a sim help
2016-05-27 04:10:36 +02:00
Pavel Zhovner 57eba86be6 Typo in hf 14a sim help 2016-05-26 20:10:03 +03:00
Iceman 26922aefd7 Update cmdlfawid.c
FIX:  when writing the timeout was triggered,  Increased it to make the writing part stable.
2016-05-21 09:42:41 +02:00
Iceman ba2e685d67 Update README.md 2016-05-19 13:07:52 +02:00
iceman1001 2fdc489bb4 CHG: printing of progress dots is better now. 2016-05-19 12:47:23 +02:00
iceman1001 118bf0c203 ADD: added a comment about Q5 settings. needs to be verified 2016-05-16 21:41:19 +02:00
iceman1001 890ae3dd43 ADD: added a comment about the Q5, which I think is wrong in these commands. Needs to be tested. 2016-05-16 21:40:19 +02:00
iceman1001 a45882e20a ADD: added 'lf io sim <version> <facility.code> <cardnumber>' to the sim command
ADD:  added 'lf io clone <version> <facility.code> <cardnumber>'  to the clone command
2016-05-16 21:39:40 +02:00
iceman1001 3f7540c9b7 CHG: added an entry to copy the 77-mm-usb-device-blacklist.rules file into /etc/udev/rules.d and reload the rules.
All needs to be executed as root,  so I use sudo.

  pm3:>make udev

Is all that is needed to install it on Linux systems.
2016-05-16 19:04:04 +02:00
iceman1001 6648776f2a CHG: added the possibility to "remagic" the new found Mifare Ultralight tags, which answers to chinese backdoor commands for uid change.
The script now deals with to different kind of tags.  Mifare Classic 1k gen1  and  Mifare Ultralight gen1 (7bytes uid)

-Classic will get    UID: 01 02 03 04
-Ultralight will get UID: 53 80 71 02 00 D9 80
2016-05-15 19:27:04 +02:00
iceman1001 8fd9bfb0e3 ADD: added the possiblity to use AWID formatlength of 26 and 50.
'LF AWID SIM'
 'LF AWID CLONE'
 'LF AWID BRUTE'
2016-05-14 22:40:04 +02:00
iceman1001 6a4271d186 CHG: Changed cardnumber printing from %d (signed) to %u (unsigned) for AWID50, it now prints correct in all cases. Thanks to @ntk for reminding me about it. 2016-05-14 14:34:35 +02:00
iceman1001 c5e8b91696 ADD: AWID 50bit demod 2016-05-13 22:52:25 +02:00
iceman1001 204b708424 ADD: AWID 50bit demod, thanks to @FrancoisM and @ntk 2016-05-13 22:34:49 +02:00
Iceman 407d62664d Update README.md 2016-05-11 13:54:31 +02:00
iceman1001 ff5f9f590c textual updates. 2016-05-10 15:38:02 +02:00
iceman1001 812513bf90 ADD: Added a new main command group "analyse", first one is the find the missing XOR in a LCR, it was a python script under /tools/xorfind.py 2016-05-10 15:30:46 +02:00
iceman1001 8085377413 CHG: output when finding key it the same as from the client. 2016-05-10 07:51:05 +02:00
iceman1001 fed1227777 CHG: just made the autopwn script main loop a bit more verbal 2016-05-10 07:40:27 +02:00
iceman1001 60e26e50c5 FIX: changed from ssized_t -> size_t
FIX:  changed off_t -> size_t
2016-05-09 08:27:55 +02:00
iceman1001 348c57a0af REM: rmove stdio.h reference to make it compile on Mac OS X 2016-05-09 08:12:43 +02:00