Commit graph

1693 commits

Author SHA1 Message Date
iceman1001
564c9ae2b6 FIX: increased time-out to match 2.7sec it takes to write 256bytes. 2016-10-09 15:49:59 +02:00
iceman1001
539fd59ebe CHG: "hf legic write" - now writes on the limits better.
CHG: "hf legic restore" - now restors :)
CHG: "hf legic rdmem" - now has a nice offset row above the read data.  try:  'hf legic rdmem 0 100'
2016-10-09 15:41:31 +02:00
iceman1001
367996567b CHG: "hf legic restore" - added a filesize and cardsize check 2016-10-08 19:25:23 +02:00
iceman1001
cd79d97223 CHG: syntax suger 2016-10-08 19:14:35 +02:00
iceman1001
f9b5377fd0 CHG: reordered the "hf search" internal checks. The iclass check takes 4.5sec to time-out...Incredible slow to identify. 2016-10-08 19:14:09 +02:00
iceman1001
5b9fb6f454 REM: "hf legic load" has been removed. It doesnt have a purpose anymore.
REM: "hf legic save"  has been removed. It doesnt have a purpose anymore.

CHG: "hf legic restore" started with the logic for the restore. Some compares and write to tag left.
2016-10-08 19:10:46 +02:00
iceman1001
59fc313d99 CHG: help text 2016-10-07 20:49:26 +02:00
iceman1001
c2ab5e8c4e FIX: "hf list legic" annotation now correct prints byte and value for "legic write" command 2016-10-07 20:23:57 +02:00
iceman1001
b816886806 FIX: one send command bug fixed. Turns out that uint16_t is too small for 21/23bits size. Who figured? 2016-10-07 19:11:38 +02:00
iceman1001
f0fa663814 CHG: "hf legic write" got a make over in how its called. Now called with 'offset' and 'data'
'hf legic write o 10 d 11223344'  -  this will write 4 bytes (0x11,0x22,0x33,0x44) to tag from offset 10 (0x0A)
2016-10-07 11:58:14 +02:00
iceman1001
ac42d5be85 chg: syntax suger 2016-10-07 00:18:02 +02:00
iceman1001
1bf1db845f CHG: syntax suger 2016-10-07 00:17:18 +02:00
iceman1001
f6e01a3493 Renamed the calccrc8 functions and command. 2016-10-07 00:14:02 +02:00
iceman1001
5a08545794 ADD: added a compiling flag -DHAS_512_FLASH i common/Makefile.common, to be used for PM3 devices with 512KB. Original commit from @hewitt 2016-10-07 00:12:09 +02:00
iceman1001
77e1bab94a REM: "hf legic writeraw" has been removed.
FIX: "hf legic eload" uploads now correct to device mem.
2016-10-06 19:34:53 +02:00
iceman1001
0e8cabed8d ADD: "hf legic eload" - Load binary file to emulator memory. Use "h" for help text
ADD:  "hf legic esave" - Save emulator memory to binary file. Use "h" for help text
2016-10-06 19:13:23 +02:00
iceman1001
9015ae0f5d CHG: "hf legic dump" now automatically detects tagtype and dumps accordingly.
CHG:  still #define codestyle  should it be with or without semicolons?
2016-10-05 22:58:06 +02:00
iceman1001
00271f774a FIX: undeclared var on deviceside,
FIX:  "hf legic dump" is almost there.
2016-10-05 22:07:32 +02:00
iceman1001
633d068682 CHG: command name changes..
old "hf legic info" is now "hf legic reader"
old "hf legic read" is now "hf legic rdmem"
old "hf legic decode" is now "hf legic info"

ADD:  new command "hf legic dump",  which will autodetect tagtype and dump all mem to a binary file.
2016-10-05 21:42:13 +02:00
iceman
f8f62cebc6 CHG: execution mode 2016-10-05 17:57:01 +02:00
iceman
77e72e8b1b CHG: execution mode 2016-10-05 17:56:44 +02:00
iceman1001
c15e07f11d CHG: making timings a bit tighter == faster read of tag. Like 1ms for whole tag.
FIX:  off-by-one bug in read-byte-loop.
2016-10-04 23:08:39 +02:00
iceman1001
e1a0ed65ff FIX: forgot a LEN in print message. 2016-10-04 21:42:56 +02:00
iceman1001
1daa1226fd CHG: reading a complete MIM1024 takes about 2.8sec. This timeout is changed to 3sec now. 2016-10-04 21:41:21 +02:00
iceman1001
7a8db2f678 CHG: "hf legic read" - increased timeout values client side, reading MIM1024 takes a bit of time 2016-10-04 21:26:19 +02:00
iceman1001
86087eba00 Textual changes in helptext. Still no clear. 2016-10-04 18:43:11 +02:00
iceman1001
7bc3c99e7e CHG: "hf legic write" started to change this command to the updated code 2016-10-04 18:05:55 +02:00
iceman1001
77a689dbeb CHG: revert legiccrc8 to old algo.
CHG: "hf legic decode" now loads EML memory
CHG: legic timings is better.
2016-10-04 00:07:07 +02:00
iceman1001
0b0b182fe2 CHG: changed to use BigBuff_Eml memory instead of big_buff_malloc.
CHG: downloading eml memory from device should use uint's
CHG: "hf legic read" has a different printing. It now prints 32bytes / row
2016-10-03 23:24:59 +02:00
iceman1001
5660920679 FIX: the "hf list legic" on MIM1024 wrapped around readingbyte 255 due to a too small varible size. Causing the upperbits to drop silently 2016-10-02 12:29:18 +02:00
iceman1001
61f97ca7ad CHG: annotation now only print relevant help text given selected protocoll. 2016-09-29 21:37:19 +02:00
iceman1001
c649c43389 CHG: finally, the ticks timer does what it is supposed to do. 32bits and working. 2016-09-29 21:36:43 +02:00
iceman1001
fabef615ec CHG: added addresize to legic select struct.
CHG: TIMER, it turns out the TC0, TC1 and TC2 is only 16bit.  So adjust to use two clocks to get a 32bit timer.
CHG: code clean up in legic device side.  consistency with variable names..
2016-09-29 17:43:39 +02:00
iceman1001
ce1cccd697 UPD: got the latest updates (@badboy) from @zhovner mfdread. 2016-09-29 14:18:21 +02:00
iceman1001
f2ba788536 ADD: @zhovner 's mfd file parser https://github.com/zhovner/mfdread Looks really nice the parsed fileoutput. 2016-09-29 12:23:35 +02:00
iceman1001
a39944216d CHG: a select_legic function with structs and stuff and 2016-09-29 12:23:09 +02:00
iceman1001
d7e24e7c5f CHG: 'hf list legic' doesn't print the parity now.
CHG: 'hf legic read' the device side timings is starting to look much better. HUGE Thanks to @will-rbnt for endless checks and logic analyser feedback. Without his effort this would not work. What does work? We can now use ANY IV in legic. The PM3 Master version is flawed, will only work with IV=0x55.

---still broke--- my crc implementation.. I know I'm about to look into it.
2016-09-28 21:37:08 +02:00
iceman1001
323e05cc20 CHG: added the verbose flag, to make the output in "hf search" lesser. 2016-09-26 21:39:04 +02:00
iceman1001
3c6542087e CHG: @ikarus23 removed all missleadning warnings for GCC6.1.1. 2016-09-26 21:38:19 +02:00
iceman1001
3e750be37c ADD: started to add a legic detection to "HF SEARCH" 2016-09-26 20:01:23 +02:00
iceman1001
f1f7430ae0 CHG: removed the ubuntu build variable which is no needed anymore to build on ubunutu.
CHG: Some warnings in cmdhflegic.c is solved.
2016-09-26 17:19:35 +02:00
iceman1001
7c91c8bf24 CHG: and now that I do actually check on bitlenght, I can get a better annotation yet again. Looking at it raises a question, acknowledge is 0x19 or 0x39, they just don't match up with tagtype identification of 0x0D, 0x1D, 0x39. I'll need to look at a 1024 tags response in a trace with a valid reader. 2016-09-26 12:58:11 +02:00
iceman1001
faabfafe30 CHG: using bitsend to determind the legic annotation in "hf list legic" makes false positives much less. 2016-09-26 12:26:37 +02:00
iceman1001
1c59e80aba CHG: fix a "indent" warning. 2016-09-26 11:01:33 +02:00
iceman1001
7d0efb37d8 CHG: the "indent" software warns about some assingments. I've tried to fix them. 2016-09-26 10:37:00 +02:00
iceman1001
f885043422 FIX: "hf 14a read" / "hf mf *" / "hf mfdes info" and failure when calling these commands serveral times in row.
For long transactions the sspclock compare with >1 instead of >=1 ..   Now the timer resets properly.
CHG: use some #define constants for iso-commands.
2016-09-23 21:28:07 +02:00
iceman1001
22f4dca88c CHG: extracted some timers functionality, to get unified access to a timer/clock which counts in ticks. Moved stuff from util.c 2016-09-21 19:03:32 +02:00
iceman1001
4490a47690 ADD: some new mifare key found, 2016-09-20 23:20:27 +02:00
iceman1001
87342aadbc CHG: adjusted timing according to @sentinel 's traces 2016-09-14 16:18:04 +02:00
iceman1001
111c6934d4 CHG: Small steps, the waiting time between frames was unclear. At least now the tags answers to a readbyte command after the setup phase. 2016-09-12 09:19:49 +02:00
iceman1001
76471e5d17 CHG: reverted back from the idea of measureing in (us) microseconds, the timer is too raw, gives 10-15us delays. Now we are measuring ticks, which is (1 us = 1.5ticks)
like it was before.   ie:  80us = 80*1.5 = 120ticks.
2016-09-11 11:14:12 +02:00
iceman1001
f72669f366 ADD: since the client now calls legic prng, this is needed here too.
CHG:  the OS X  QT4 vs QT5 detection.  NOT fixed yet.
2016-09-09 11:58:53 +02:00
iceman1001
ad5bc8cc8c In my attempts to make the LEGIC code better, its not working now. Timings if off.
CHG: switching to US clock.
CHG: better trace annotation for legic
CHG: Legic prng can now give a x bits in once.
2016-09-09 11:56:20 +02:00
iceman1001
1b12afbd9f CHG: better annotation for 'legic' 2016-09-07 12:36:46 +02:00
iceman1001
e619ddc071 FIX: Better legic annotation, show which byte was targeted during read and write commands. 2016-09-03 12:20:12 +02:00
iceman1001
b98827ffc3 FIX: IV now is trunckated to 7bits in 'hf legic read,write, writeraw'
FIX: IV LSB bit is always set, in 'hf legic read,write, writeraw'
2016-09-03 12:19:05 +02:00
iceman1001
c71c5ee156 ADD: started to add tracelog in legic
ADD: remake of legic codebase.
ADD: started with a annotation for LEGIC in 'hf list'
2016-09-02 16:25:54 +02:00
iceman1001
5b4664e79f CHG: Adding clarity to the command helptext. 2016-09-01 20:36:42 +02:00
iceman1001
d801514d88 CHG: Supressing output for LF or HF antenna values if zero, in 'hw tune' command 2016-09-01 20:36:10 +02:00
iceman1001
22635d611e FIX: Only need to print a uint32_t, 2016-09-01 16:10:25 +02:00
iceman1001
56d0fb8e4d FIX: bug in nextwatch demod, which if the found psk bits was smaller than the preamble the client crashed.
REM: removed some debugstatements
2016-09-01 16:09:31 +02:00
iceman1001
3fc01243b0 CHG: A repaint the plot window should be done to make sure its visual. 2016-08-31 19:24:18 +02:00
iceman1001
4c543dbd3f ADD: added a simple averging filter function. input parameter K, can be 1 to 8
ref: http://www.edn.com/design/systems-design/4320010/A-simple-software-lowpass-filter-suits-embedded-system-applications
2016-08-29 20:29:31 +02:00
iceman1001
7aa24806f4 FIX: the check for formatlen was wrong.
Still missing the other formats,  only 26bit in this one.
2016-08-26 22:31:45 +02:00
iceman1001
ffa306de61 CHG: starting to add the legic changes.. *work in progress* 2016-08-26 17:19:27 +02:00
iceman1001
89603cbddc FIX: minor adjustments to 'lf awid bruteforce'
FIX: making the 'lf hid bruteforce' to work the same way as the awid one..
2016-08-26 17:18:48 +02:00
iceman1001
f121b478a1 FIX: 'lf awid bruteforce' cleaning up all debug messages 2016-08-26 16:35:30 +02:00
iceman1001
ba1324a5fe some text changes. 2016-08-24 14:58:50 +02:00
iceman1001
760157f50b CHG: added a verification to see if the found candidate key was able to validate against tag. If not ok, start darkside attack again. 2016-08-24 14:10:30 +02:00
iceman1001
02d5a58388 CHG: Changed the number of times the call to prng_successor is called. 2016-08-24 12:32:05 +02:00
iceman1001
39d43ccc21 CHG: syntax suger. 2016-08-24 12:31:09 +02:00
iceman1001
2c9e30908c CHG: updated Reveng version from 1.4.0 -> 1.4.4 .
---snippet from their update log:

1.4.4 27 July 2016

    Added 5 new algorithms, CRC-8/AUTOSAR, CRC-8/OPENSAFETY, CRC-16/OPENSAFETY-A, CRC-16/OPENSAFETY-B and CRC-32/AUTOSAR from the CRC Catalogue.
    Added a build option to verify the order of the preset and alias tables at compile time.

1.4.3 14 July 2016

    Added algorithm CRC-16/CMS from the CRC Catalogue.

1.4.2 8 July 2016

    Added algorithm CRC-16/PROFIBUS from the CRC Catalogue.

1.4.1a 29 June 2016

    Fixed a regression that caused the Windows release to crash on older systems.

1.4.1 27 June 2016

    -P sets the Width value just like -k.
    pcmp() quickly returns when the comparands are identical.
    Added resources for the Windows executable.
2016-08-21 20:51:29 +02:00
iceman1001
bc908d8f9d ADD: Mifare Desfire defines 2016-08-14 17:38:54 +02:00
iceman1001
af17926620 chg; syntax suger 2016-08-14 17:38:11 +02:00
iceman1001
f2abf6732b help text adjustments 2016-08-14 17:11:42 +02:00
iceman1001
ab74872d40 ADD: added a sanity check in T55x7 commands info/trace/detect against useing the commands when device is in offline but user didn't use '1' in arguments. 2016-08-14 17:04:40 +02:00
iceman1001
7e08450dcc add: annotage Mifare Desfire. from 3102c1bae3 (diff-93cfa90a992ea759349344d0de98029e)
Thanks @johannesStoye
2016-08-14 16:29:39 +02:00
iceman1001
2b6ffe75a8 chg: remove a char.. 2016-08-10 16:29:23 +02:00
iceman1001
4ab54914e3 CHG: more struct errors.. my bad, 2016-08-10 16:28:23 +02:00
iceman1001
31cf804877 CHG: removed some debug statements, added another. Change the crapto1.c, lets see if the special attack works better now against chinese clones. 2016-08-10 16:25:56 +02:00
iceman1001
823ad2e186 CHG: minor code cleaning in 'hf 14a reader' 2016-08-10 16:24:49 +02:00
iceman1001
56f1aaa234 CHG: on a slow usb connection it seems the pingcmd which stops the bruteforce on deviceside doesnt get there. Lets send three pings to make sure the device gets it. 2016-08-10 16:23:59 +02:00
iceman1001
6067df30c5 FIX: at least now the special zero parity attack, repeats and doesn't crash. However it doesn't find the key either :( 2016-08-10 10:55:29 +02:00
iceman1001
86db8973b0 CHG; still looking at 14b, this time started to look at the tracelog times not working. 2016-08-09 23:13:18 +02:00
iceman1001
59e933fc3f started fixing the paritiy == 0 special attack against chinese clones with bad prng, which hasnt been working for ages. 2016-08-09 23:11:07 +02:00
iceman1001
05442fa6f7 fix: wrong spelling 2016-08-09 12:15:26 +02:00
iceman1001
f5291a6ce1 FIX: Travis CI complains about missing stdbool.h includes 2016-08-09 12:11:11 +02:00
iceman1001
10c4231ec7 ADD: 'lf awid brute' is now possible to give a starting cardnumber. if given, the bruteforce loops from it as a mid point. Testing one step up, then one step down until it reaches 65535 and 0.
CHG: 'lf awid brute' inputs are now changed, take notice to new format.
2016-08-09 11:56:06 +02:00
iceman1001
3d4207f3b6 syntax suger
chg:  added clearCommandBuffer(); before calls to sendcommand.
2016-08-09 09:12:16 +02:00
iceman1001
8a5b3c2a45 CHG: textual fixes in help text
CHG: better exit message for 'lf awid bruteforce'
2016-08-09 09:10:26 +02:00
iceman1001
9bfd93ec15 FIX: delay was parsed incorrect into a uint8_t...
CHG: help text fixed
2016-08-08 22:17:15 +02:00
iceman1001
934dfd728d ADD: Added a delay in ms to 'lf awid brute' Thanks to @crayon for the idea. 2016-08-08 22:09:51 +02:00
iceman1001
471f89b8bd FIX: the cmdline parsing was a bit too hard. Thanks to @crayon for pointing out there were a bug here. 2016-08-08 21:27:53 +02:00
iceman1001
d9ed4e1914 ADD: J-Run's 2nd phase tool mf_key_brute ref: https://github.com/J-Run/mf_key_brute Estimated time to search keyspace is ~18min.
J_Run's 2nd phase of multiple sector nested authentication key recovery
You have a known 4 last bytes of a key recovered with mf_nonce_brute tool.
First 2 bytes of key will be bruteforced

Usage:  hf mf keybrute [h] <block number> <A|B> <key>
options:
      h               this help
      <block number>  target block number
      <A|B>           target key type
      <key>           candidate key from mf_nonce_brute tool
samples:
           hf mf keybrute 1 A 000011223344
2016-08-08 17:49:30 +02:00
Alexis Green
170e7c9c51 FIX: erroneous semicolon 2016-08-07 20:07:25 -07:00
iceman1001
b62cbadb61 CHG: fixes to match the new arguments to the darkside attack (keytype A|B and blocknumber) in mifare_autopwn.lua script. 2016-08-07 21:19:11 +02:00
iceman1001
16658b1ff1 CHG: moved some TEA crypto stuff from 14b into analyse. 2016-08-07 21:08:17 +02:00
iceman1001
5def0b3c74 CHG: increased the script-filename column width from 16 to 21. 2016-08-07 21:05:09 +02:00
iceman1001
a152dea7b4 textual changes. 2016-08-07 18:50:25 +02:00
iceman1001
fa5118e730 CHG: some calyspo stuff 2016-08-04 21:57:40 +02:00
iceman1001
f0e183ece4 CHG: marshmellow42 's improved "hf mf sim x" 2016-08-04 21:57:18 +02:00
iceman1001
52eeaef568 CHG: moved a defince arraylen into util.h and changed to uppercase. 2016-08-04 21:54:11 +02:00
iceman1001
df007486f5 ADD: @donwan581 select keytype for the darkside attack. 2016-08-04 21:51:26 +02:00
iceman1001
26778ea772 FIX: coverity scan 133850, again. Why on earth did the 7 come from. I removed it. 2016-08-03 12:09:16 +02:00
iceman1001
c5d886170c fix: COVERITYSCAN 133871, fix one part, breaking another. shouldnt have changed to uint8_t since it can never be negative. 2016-08-03 11:57:40 +02:00
iceman1001
e8fecd72bc FIX; coverity scan 133850, & operation should keep only topbit of lower nibble.
CHG: tabs fixed
2016-08-03 10:01:37 +02:00
iceman1001
a28d34f407 Coverity Scan 133850, need to ask @jason about this one. 2016-08-03 09:32:07 +02:00
iceman1001
01629305d8 Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-08-03 09:30:01 +02:00
iceman1001
8a8de2cb6d FIX: 133853, If you have 3items in a array, don't start with index 4 or 3, mental note to self, stop coding when you are tired. 2016-08-03 09:28:54 +02:00
Alexis Green
987c59849e FIX: CoverityScan 123358 and 133864 - Unchecked return value 2016-08-02 22:44:36 -07:00
Alexis Green
3f5bcc3b92 FIX: CoverityScan 121362 - Pointer to local outside scope 2016-08-02 16:12:44 -07:00
iceman1001
80920fac96 FIX: forgot a semicolon 2016-08-03 00:42:23 +02:00
iceman1001
fd9212e183 FIX: CoverityScan 133857, cast to uint32_t will stop eventual problems. However its a uint_16 so it shouldnt be a problem to start with. 2016-08-03 00:15:26 +02:00
iceman1001
34c81fe01c FIX. COVERITYscan 133860, initialize to zero. This function is still not working but at least now it doesnt crash the client. 2016-08-03 00:13:33 +02:00
iceman1001
5fe0a11dfe FIX: CoverityScan, 1333853, out-of-bounds, well, if I have 3 items in a array, don't start reading 4... 2016-08-03 00:10:21 +02:00
Alexis Green
e31a0f736e FIX: LEGIC - potential stack corruption calculating CRC from user input 2016-08-02 14:10:33 -07:00
Alexis Green
0892708119 FIX: CoverityScan 123465 - Resource leak 2016-08-02 13:57:44 -07:00
Alexis Green
5147ec6959 CHG: LEGIC - allow offline mode due to existing offline command 2016-08-02 13:51:58 -07:00
iceman1001
e719470c46 Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-08-02 16:06:40 +02:00
iceman1001
5f7e30f8d5 FIX: CoverityScan 133858 -uninitialized data 2016-08-02 16:05:50 +02:00
iceman1001
aeb128e2bb chg: another way of checking a array for NULL 2016-08-02 16:04:57 +02:00
Alexis Green
6e321dd8f3 Fixing warning:
warning: ignoring return va 'scanf', declared with attribute warn_unused_result [-Wunused-result]
2016-08-01 13:03:46 -07:00
Alexis Green
22e31cd087 Fixing clang compilation warning
warning: shifting a negative signed value is undefined [-Wshift-negative-value]
2016-07-31 22:35:16 -07:00
iceman1001
9f52c9db28 FIX: removed a compiler warning, the stringlen is not used anymore. 2016-07-31 22:03:46 +02:00
iceman1001
af4308b97b CHG: Moved some includes, defines, structs from .c into header file. 2016-07-31 22:00:49 +02:00
iceman1001
cc4c8fd6cf FIX: getting rid of a compiler warning message. 2016-07-31 21:59:29 +02:00
Alexis Green
415e9f00d5 Adding a 'recoverpw' command for T55xx to try to recover corrupt password written by a handheld cloner by fiddling with bits in the expected password. 2016-07-31 12:33:03 -07:00
iceman1001
a0c7eea77a CHG: moved out some help-texts into its own usage-functions. 2016-07-31 11:37:19 +02:00
iceman1001
00abc7c1ab CHG: Moved a 'include' statement to header file 2016-07-30 19:37:15 +02:00
iceman1001
955228691e REM: cleaning up some commented code. 2016-07-30 19:36:48 +02:00
iceman1001
d0724780ab FIX: Found a minor bug in 'LF CMDREAD' where it on device side didn't compare with the right char 'h' instead of 'H'. Re-wrote that whole part anyway, I changed periods to be max 0xFFFF in length, doubtful that a zero or one delay will be bigger than 65535... 2016-07-30 19:30:53 +02:00
iceman1001
dc6c90c376 CHG: The jablotron demod now deals with the strangeness of hex symbols A-F in cardid the same way a reader prints it. 2016-07-29 23:30:40 +02:00
iceman1001
dae31af21e ADD: Binary Encoded Digit -> Decimal
ADD: Decimal -> Binary Encoded Digit

Ie
  decimal 2345 becomes 0x2345
  and
  hex 0x2345 becomes decimal 2345
2016-07-29 23:29:37 +02:00
iceman1001
514ddaa2ff CHG: help text changes in cmdlfjablotron.c
CHG: increase byte size to uint16_t in crc.c CRC16Legic
2016-07-29 20:58:52 +02:00
iceman1001
f5538c1c4e chg: textual change. 2016-07-29 20:53:56 +02:00
iceman1001
ddbe76d3c6 CHG: redundant 'return' statement removed 2016-07-29 14:32:13 +02:00
iceman1001
29ce214c65 CHG: better printing output of card ID
CHG: better detecting in preambl. 16bits with 1, and a zero bit.  Also cleared this topbit when cloneing and simulating.
2016-07-29 14:31:39 +02:00
iceman1001
8ae9b358f8 CHG: textual changes to help text.
CHG: removed the 'd' as input,  the clone/sim commands is simpler.
CHG: printing of card ID is now zero padded.
2016-07-29 13:46:05 +02:00
iceman1001
6c28395106 ADD: LF JABLOTRON functionality. with clone/sim and detection in LF SEARCH.
CHG: removed no-existing crc8ja code
FIX: a check in ASKbiphaseDemod to make sure graphbuff is not empty.
2016-07-29 11:04:12 +02:00
iceman1001
e92948c60c FIX: that OEM variable that is unused. 2016-07-28 22:22:34 +02:00
iceman1001
ba4ad25b37 FIX: Fixed some warnings I didn't take notice off.
- memcpy should have been "memset"
- forgot to add function declaration into header file.
2016-07-28 22:17:44 +02:00
iceman1001
758f5ee3e5 CHG: removed the wiegand converting, since I'm not happy with how its implemented. This is rework in progress. 2016-07-28 21:50:54 +02:00
iceman1001
1e2bb9c9f4 CHG: trying to figure out why I can't get the seconds out.. 2016-07-28 21:48:53 +02:00
iceman1001
53b3c3e816 ADD: Added some new analyse functions like CHKSUM ADD/SUBTRACKT with one's complement 2016-07-28 21:47:52 +02:00
iceman1001
c827ffb098 spacing.. 2016-07-28 21:46:27 +02:00
iceman1001
3e134b4c20 CHG: merged the forum user @jason 's fixes to LEGIC. *UNTESTED*
CHG: changed the CRC implementations.
2016-07-28 21:41:44 +02:00
iceman1001
83dad64b91 ADD: some new usb commmands from EMV, and for LEGIC. 2016-07-28 21:16:02 +02:00
iceman1001
91d4cda48b CHG: removed the linking to radixsort.c 2016-07-28 20:42:46 +02:00
iceman1001
4ccdc189bd Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-07-28 20:41:54 +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
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
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
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
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
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
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
iceman1001
2fdc489bb4 CHG: printing of progress dots is better now. 2016-05-19 12:47:23 +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
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
204b708424 ADD: AWID 50bit demod, thanks to @FrancoisM and @ntk 2016-05-13 22:34:49 +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
df82844c05 FIX: more paths for readline and Mac Os X 2016-05-06 19:52:04 +02:00
iceman1001
b01e7d206d FIX: a define which was wrong 2016-05-06 19:30:43 +02:00
iceman1001
9d590832a1 FIX: This tries to fix the memalign issued on MAC OS X, which it doesn't have. However its standard Malloc is already 16byte memaligned.
ref: http://stackoverflow.com/questions/196329/osx-lacks-memalign
2016-05-06 19:09:29 +02:00
iceman1001
0fa87186cf CHG: hardnested needs malloc.h, which on Darvin (Mac OS X) needs a path to. 2016-05-06 19:01:33 +02:00
iceman1001
e75bc417f1 ADD: added a lua script which calculates mifare keys based on a uid diversification 2016-05-06 10:19:15 +02:00
iceman1001
04da5cd92b FIX: it seem the fcntl returns -1,.. which made the flasher fail. 2016-05-05 21:13:12 +02:00
iceman1001
532bcd7145 CHG: Nedap demod, now verifes with first parity. 2016-05-04 10:34:16 +02:00
iceman1001
b85385a058 CHG: removed a warning about unused variable. Lets see if perror works. 2016-05-03 09:16:05 +02:00
iceman1001
c71f4da9bc CHG: increased the preamble
CHG:  from inverted to non-inverted. 2 of the forum samples is non-inverted.

Block 0:  00150080
2016-05-02 21:21:43 +02:00
iceman1001
d34a0b0cc7 FIX: dual definitions of variable size 2016-05-02 15:15:06 +02:00
iceman1001
96faed2124 CHG: added the ASK/Biphase demod of signal for NEDAP demod.
ADD: 'LF SEARCH'  now also checks for NEDAP.
2016-05-02 14:06:08 +02:00
iceman1001
56bbb25a41 ADD: started with a NEDAP demod, read, clone and sim functionality.
The encrypted part is not solveabled today.
2016-05-02 13:42:06 +02:00
iceman1001
ea1ee62e55 CHG: better helptext 2016-04-29 22:24:08 +02:00
iceman1001
ffeb77fdc6 CHG: the 14b is getting better, since I added the fpga waiting signaling I found in "14a emgetcmd" etc. 2016-04-29 22:23:32 +02:00
iceman1001
7bcddfabde FIX: mental note to self, don't forget to adjust messages to new logic 2016-04-27 20:03:54 +02:00
iceman1001
a644fef0bb FIX: Mental note to self, bitnumber 4 is used, not the value 4 which would be bitnumber 3... when deciding if request is REQB or WUPB 2016-04-27 19:54:29 +02:00
iceman1001
45c0c48c49 CHG: Just changed the order of printing, so the messagde FoundKey is printed last. 2016-04-27 11:22:17 +02:00
iceman1001
dccddaef77 CHG: "hf 14b sim" - Added the possibility to call it with a PUPI/UID. Sample: "hf 14b sim u 11223344" 2016-04-27 11:21:29 +02:00
iceman1001
fd3be901ea removed commented code 2016-04-26 21:30:54 +02:00
iceman1001
c98ab35140 textual change. 2016-04-26 21:30:04 +02:00
iceman1001
a420e5c163 chg; no more crash when getting partial usb packages. 2016-04-25 23:15:12 +02:00
iceman1001
ed69e099a1 FIX: @Aczid suggested this to fix a Coverity scan warning. 2016-04-25 14:30:13 +02:00
iceman1001
18b90cce48 CHG: this fixes an annoying fault of not running CONNECT in raw command... 2016-04-24 21:44:19 +02:00
iceman1001
222bdb1cb3 Syntax suger 2016-04-24 21:43:38 +02:00
iceman1001
9965e0d1f8 CHG: this should remove a Coverity Scan warning. 2016-04-24 21:42:42 +02:00
iceman1001
c0afa86f75 FIX: this commit solves a sneaky bug in 'LF VIKING' commands. The getVikingBits dropped the highest byte in the uid while creating the datablocks for the clone.
ADD:  added some extra message in debugmode when looking at viking tags.
2016-04-24 21:41:45 +02:00
iceman1001
21d359f68f CHG: we don't want to assert inside the pm3 client.
CHG: better message when failed to find the key.
CHG: revert nonces check, 12 -> 100
2016-04-23 19:09:07 +02:00
iceman1001
1c38049bcb CHG: commented away some of the debug printf statements in hardnested. 2016-04-23 18:33:27 +02:00
iceman1001
cd777a0545 FIX: Some Coverity Scan warnings. fread, not initialised etc etc 2016-04-23 18:23:46 +02:00
iceman1001
b9fc3e8eb7 RM: removed some old reference inside some old proggies... 2016-04-23 13:03:27 +02:00
iceman1001
2813c42f98 CHG: moved some params. 2016-04-23 13:02:51 +02:00
iceman1001
be6e909c5b FIX: time printing, like difftime in MINGW enviroments needs to use 32b time. 2016-04-23 13:02:20 +02:00
iceman1001
9ea10847ea CHG: timeing in chk keys, 2016-04-23 12:26:29 +02:00
iceman1001
fa0e0b109f CHG: moved out some usage_methods for help texts.
CHG: added some time in the darkside, nested, hardnested, chk commands.
2016-04-23 12:18:34 +02:00
iceman1001
5dc8b8fe27 CHG: unified some text messaged. 2016-04-23 11:43:02 +02:00
iceman1001
d948e0d140 CHG: 'hf mf chk' now correctly tests to read key B, when we specify target keytype B or ?.
CHG: 'hf mf chk'  now correctly init all sector keys to 0xFFFFFFFFFFFF,  so it looks unified.
2016-04-23 11:32:37 +02:00
iceman1001
2e350b19f7 FIX: there were no "memfree" call, there were only "free" 2016-04-21 12:15:36 +02:00
iceman1001
3130ba4b21 ADD: added @azcid 's bitsliced BF solver for @piwi 's hardnested command. Awsume work! The original patch demanded some tweaking to work in mingw.
This is not tested for other systems so far.
2016-04-21 10:26:00 +02:00
iceman1001
f7c1a934d0 CHG: "hf 14a sim" now uses mfkey32 and mfkey32_moebius as methods to retrive the key in attack_mode. 2016-04-18 13:20:17 +02:00
iceman1001
6c84c90017 FIX: this fixes the "hf mf sniff l d f" command, which has been broken for a while. The cuid is correct used for decrypting.
FIX: The flushing of logentries.
ADD: "hf mf sniff" - added the sniffing of UID's with a uidlen of 10.

Whats left? The key is not always found even if we use the "mfkey64" approach.

ADD: added the parity_zero attack in "hf mf mifare".  Still not working since piwi's changes to the iso14443a.c,  maybe needs a param to tell it to collect nonces for this special attack.
CHG: extracted some help-texts into usage_* methods. Changed some text as well

FIX:  "hf mf sim" command now uses both  mfkey32 and mfkey32_moebius version to find the key in attack mode.
CHG:  "hf mf sim" also now defaults to emul_memory to read a 4 byte UID.
2016-04-18 13:18:02 +02:00
iceman1001
cd91e41cb5 FIX: this fixes the mftry32, mftry32moebius and trymf64 implementations. Which is used in the "hf mf sim x" and "hf 14a sim x" built in attacks.
ADD: added the nonce2key version which should be able to find the key when the collected PARITIES is ZERO.
2016-04-18 13:08:18 +02:00
iceman1001
c805748f34 ADD: added a method for le32toh. Converting bytes to uint32_t .
CHG: correct use of FILE_PATH_SIZE in the tracelogging functions.
2016-04-18 13:05:35 +02:00
iceman1001
ce211cef39 FIX: corrected the FLAG_NR_AR_ATTACK 2016-04-18 13:02:36 +02:00
iceman1001
40f6f2ff50 ADD: started to add a BUTTERWORTH filter, not working yet. 2016-04-14 11:37:17 +02:00
iceman1001
0e32bf46e7 CHG: added the ascii output for the pwd. 2016-04-14 11:32:43 +02:00
iceman1001
0194ce8fc8 ADD: simulating can now handle triplesized UID (10b)
CHG: moved some mifare #DEFINES into protocols.h  (ACK,NACK..)
2016-04-14 11:09:17 +02:00
iceman1001
7ee74a8ebd CHG: Swapped to using the DEFINES. 2016-04-14 11:05:27 +02:00
iceman1001
01c78dabc3 CHG: syntax suger 2016-04-11 15:26:55 +02:00
iceman1001
2daa0d0b1e CHG: doesnt flush the printf() calls 2016-04-10 13:34:27 +02:00
iceman1001
cbdcc89ae7 CHG: free the malloc:d memory in the crc8 function.
CHG: use the new GetEMLfrombigbuff  method.
ADD: added a usage_legic_read
2016-04-10 13:18:11 +02:00
iceman1001
407697dfe3 ADD: more keys 2016-04-09 19:46:57 +02:00
iceman1001
bae363d860 ADD: more keys.. 2016-04-09 19:45:28 +02:00
iceman1001
9e43f09ade removed some old code,
rename a function, that tries to add IIRfilter Butterworth on a signal.  Lets see if I can get it to work on Graphbuffer data one of these days.
2016-04-05 04:51:06 +02:00
iceman1001
5774b2b44d ADD: added a WIN sample. 2016-04-05 04:48:05 +02:00
iceman1001
d40d64ef0d CHG: old code calls outdated command. Even if it works in my fork, it doesnt work in PM3 master. 2016-04-05 04:47:42 +02:00
iceman1001
12b998cbd8 ADD; Some 7816 error codes 2016-04-05 04:46:25 +02:00
iceman1001
13629a71d3 minor adjustements, found some comments. 2016-04-05 04:45:07 +02:00
iceman1001
ef085a5948 CHG: adjusted two arrays in scripting.c to mirror the added models in reveng 1.4.0 2016-04-05 04:43:54 +02:00
iceman1001
4534ec060a CHG: and the Makefile needs also to be updated 2016-04-05 03:35:47 +02:00
iceman1001
ca98f30c53 CHG: forgot one file for the RevEng update 2016-04-05 03:35:12 +02:00
iceman1001
0a25987730 Add; some keys 2016-04-05 03:34:46 +02:00
iceman1001
a78a3d9dc3 CHG: Updated RevEng1.31 to 1.40
--snipped changelog

1.4.0	24 February 2016
	* Added 11 new algorithms, CRC-4/INTERLAKEN, CRC-7/UMTS,
	  CRC-8/LTE, CRC-8/SAE-J1850, CRC-11/UMTS, CRC-16/LJ1200,
	  CRC-24/BLE, CRC-24/INTERLAKEN, CRC-24/LTE-A, CRC-24/LTE-B,
	  CRC-30/CDMA, and 4 new aliases, CRC-12/UMTS, CRC-16/LTE,
	  CRC-16/UMTS, CRC-32/INTERLAKEN, from the CRC Catalogue.
	* Eliminated string comparison when testing if a model name is
	  an alias.
	* Split off presets into preset.c.
	* Eliminated bogus calls to bsearch() in preset.c.
2016-04-05 03:34:03 +02:00
iceman1001
c3559d162a textual changes 2016-03-23 14:04:10 +01:00
iceman1001
b9e66427b7 Forgot some breaks, and a faulty comparision of a set bit. 2016-03-23 14:03:41 +01:00
iceman1001
186ad6037c ADD: added the ETU and Frame wait time based on the Frame wait integer value. 2016-03-23 14:02:50 +01:00
iceman1001
06eb3b1a8c coverity fixes for my latest changes.
Forgot some breaks in 7816 annotation, and  presco used an uninitalized char array.
2016-03-22 08:40:20 +01:00
iceman1001
774560e39e CHG: no parity tests for ISO_7816_4 annotation 2016-03-21 22:07:55 +01:00
iceman1001
5de71ee6bf CHG: enter a define for TIMEOUT 2016-03-21 22:07:23 +01:00
iceman1001
ab6d8a4c47 CHG: fixed the commands, its now valid calypso 7816 commands. 2016-03-21 22:06:51 +01:00
iceman1001
0fcfad0ee6 CHG: testing for windows clients to get a higher baudrate. Was 9600, testing 115200 as for non_win.
CHG: testing to set USB 2.0 standard,  instead of USB1.1  ...
2016-03-21 22:05:59 +01:00
iceman1001
4bf0f73d76 increased a number of calypso commands for selecting files and trying to read them 2016-03-20 21:30:40 +01:00
iceman1001
452aab1e59 ADD; first try at reading calypso tags 2016-03-20 20:22:35 +01:00