Proxmark3 community

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

You are not logged in.

Announcement

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.

#1 2014-07-08 09:43:39

iceman
Administrator
Registered: 2013-04-25
Posts: 9,538
Website

[Resolved] Updated GCC to 4.9.0, Issue with <readline/readline.h>

I guess I messed up my dev-environment setup for PM3-win when I upgraded the GCC to 4.9.0...

The new GCC is supposed to have readline built-in,  ie use the  "-lreadline" argument,  but I can't get it to work anymore.
Have someone a clue on hop to get it to work again.

Last edited by iceman (2015-03-20 14:53:36)

Offline

#2 2014-09-16 13:01:55

iceman
Administrator
Registered: 2013-04-25
Posts: 9,538
Website

Re: [Resolved] Updated GCC to 4.9.0, Issue with <readline/readline.h>

It sorted its self out... I found some guides online on how to install readline for Mingw..

Offline

#3 2016-05-06 21:47:57

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: [Resolved] Updated GCC to 4.9.0, Issue with <readline/readline.h>

Dear Iceman, could you give me a hint how to clear this readline/readline.h error.

I use minGW, GCC 4.7.2 I can build your fork, MM or top of tree SW without err. But, to solve another issue (...) after reading some of your comments, I think maybe it is safe to move GCC version up.... and BOOOM that error with readline/readline.h appeared, (and also later issue with pthread too)

I have searched up and down had tried many things and can not find solution to build your fork with 4.9.0. mingw-get-setup manages many package beautifully but does not help you with upgrad of readline package. Could you pls share the info how to get 4.9.0 working with PM3 SW pls.

Last edited by ntk (2016-05-06 21:48:57)

Offline

#4 2016-05-07 01:16:21

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: [Resolved] Updated GCC to 4.9.0, Issue with <readline/readline.h>

Maybe I can put it this way: If today I still can compile yours, piwi's, MM42's or trunk SW is there really any need to bring gcc's level up to version 4.9.0?

PS:
c:\setuptools>python easy_install.py readline
Searching for readline
Reading https://pypi.python.org/simple/readline/
Best match: readline 6.2.4.1
Downloading https://pypi.python.org/packages/f4/01/2cf081af8d880b44939a5f1b446551a7f8d59eae414277fd0c303757ff1b/readline-6.2.4.1.tar.gz#md5=578237939c
81fdbc2c8334d168b17907
Processing readline-6.2.4.1.tar.gz
Writing c:\users\user\appdata\local\temp\easy_install-8hbgth\readline-6.2.4.1\setup.cfg
Running readline-6.2.4.1\setup.py -q bdist_egg --dist-dir c:\users\user\appdata\local\temp\easy_install-8hbgth\readline-6.2.4.1\egg-dist-tmp-irljiw
error: Setup script exited with error: this module is not meant to work on Windows

Last edited by ntk (2016-05-07 02:24:57)

Offline

#5 2016-05-07 07:44:24

iceman
Administrator
Registered: 2013-04-25
Posts: 9,538
Website

Re: [Resolved] Updated GCC to 4.9.0, Issue with <readline/readline.h>

I don't know,  I've gcc 4.8.4  and 4.9 on my different dev-enviroments.  Both of them can compile the new code (bf solver) for the command "hardnested".   I've not tried on a 4.7.2. 
If it compiles fine and you can run the bf solver,  then I see no reason to upgrade for you.

Offline

#6 2016-05-07 09:08:48

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: [Resolved] Updated GCC to 4.9.0, Issue with <readline/readline.h>

I can not say it results to anything on an old mifare card. But I can call the command like this . Mine is gcc 4.7.2 so I guess I can leave it alone.

PS:Now
mingw-builds-install
mingw-get-setup
just crashed immediately in the minGW directory when I try to change GCC version.

Offline

#7 2016-05-08 14:59:17

iceman
Administrator
Registered: 2013-04-25
Posts: 9,538
Website

Re: [Resolved] Updated GCC to 4.9.0, Issue with <readline/readline.h>

if you can compile my fork without errors, then the hardnested will work.

Offline

#8 2016-05-08 16:12:19

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: [Resolved] Updated GCC to 4.9.0, Issue with <readline/readline.h>

iceman wrote:

if you can compile my fork without errors, then the hardnested will work.

I have a new ICE directory with your fork in it, I ran msys.bat from inside the minGW; I checked gcc is 4.7.2, and I ran make clean all from c:\ice directory. So am positive it has compiled without error.

Is hardnested the implementation of this article
,Ciphertext-only Cryptanalysis on Hardened Mifare Classic Cards, Iceman?

 

Despite a series of attacks, MIFARE Classic is still the world's most widely deployed contactless smartcard on the market. The Classic uses a proprietary stream cipher CRYPTO1 to provide confidentiality and mutual authentication between card and reader. However, once the cipher was reverse engineered, many serious vulnerabilities surfaced. A number of passive and active attacks were proposed that exploit these vulnerabilities. The most severe key recovery attacks only require wireless interaction with a card. System integrators consider such card-only attacks as one of the most serious threat vectors to their MIFARE Classic-based systems, since it allows the adversary to avoid camera detection, which is often present at an access control entrance or public transport gate. However, all card-only attacks proposed in the literature depend on implementation mistakes which can easily be mitigated without breaking backwards compatibility with the existing reader infrastructure. Consequently, many manufactures and system integrators started to deploy "fixed" MIFARE Classic cards which are resilient to such vulnerabilities. However, these countermeasures are rather palliating and inadequate for a cryptographically insecure cipher such as CRYPTO1. In support of this proposition, we present a novel cipher-text card-only attack that exploits a crucial and mandatory step in the authentication protocol and which solely depends on the cryptographic weaknesses of the CRYPTO1 cipher. Hence, in order to avoid this attack, all cards and readers should be upgraded to support an alternative authentication protocol which inherently breaks their backwards compatibility. Our attack requires only a few minutes of wireless interaction with the card, in an uncontrolled environment and can be performed with consumer-grade hardware. The information obtained allows an adversary to drop the computational complexity from 2^48 to approximately 2^30, which enabled us to practically recover a secret key from a hardened MIFARE Classic card in about 5 minutes on an single core consumer laptop.

Offline

#9 2016-05-08 17:34:51

iceman
Administrator
Registered: 2013-04-25
Posts: 9,538
Website

Re: [Resolved] Updated GCC to 4.9.0, Issue with <readline/readline.h>

yes,

Offline

Board footer

Powered by FluxBB