Skip to main content

Analyzing smart card using Proxmark3 ヽ(゚Д゚)ノ (day 43)



Warning! the following post is only meant for education and research not meant for causing destruction. Be smart!

I should say big big big .... thank you to Carlos (classmate for master's class) for let me to borrow one of his tools (Proxmark3) to play with smart cards. We have a lot of fun doing our little research to know more about this type of technology and here is what we get so far

enjoy :)

tools: Proxmark3

is a powerful general purpose RFID tool, the size of a deck of cards, designed to snoop, listen and emulate everything from Low Frequency (125kHz) to High Frequency (13.56MHz) tags.


before you use this you need to install the software in your OS (follow this link:https://github.com/Proxmark/proxmark3/wiki/Ubuntu-Linux)

after you complete the setup, you need to know which usb driver is linux load the Proxmark3, type:

~# dmesg


ok so we know is loaded in ttyACM0, we can just loaded software in the following way:


we can check the status of the hardware using:

~# hw status



Luckily again, Carlos bring a lot of ... i mean a lot card that we can analyze.


In this post we are just going to analyze each of this card and explain what we found. I also bring my "brizzi" it is come from Indonesia and it is an E-card used for paying transportation by just tapping it to the reader.


Most of the E-card right now mostly used HF (High Frequency)

In RFID we can categorize the card into three types:
  • Low frequency which is running on 30 KHz to 300 KHz, mostly used for object tracking in warehouse or farm but it can also be used in access control.

  • High frequency which is running on 3 MHz to 300 MHz, mostly used in payment and passport
 

  • Ultra High frequency which is running on 300 MHz to 3 GHz. Separate into passive UHF (used in  tool tracking , IT asset tracking, race timing, and laundry management. New applications for these tags are being discovered frequently due primarily to the tags’ long read range and low cost) and active UHF (used like oil and gas, transportation, and vehicle tracking)
we found all of the card that we analyze is used the HF type, I think it is more reliable and more persistence against interference.

This is what we got:


we found out that there are three types of HF we can find in that deck of card.

1st types: MIFARE classic V1

MIFARE is the NXP Semiconductors-owned trademark of a series of chips used in contactless smart cards and proximity cards.

using Proxmark3 we can identify which type of the card is used

~# hf search



we found this type of card when analyzing card for conference, hotel and cafeteria. Notice that MIFARE card was equipped with prng (pseudo random number generator) this is actually really good, to strength the encryption process but proxmark3 can detect the strength of the prng if the random generator is weak we are able to dump the content of the card and clone it.

please take a note, cloning MIFARE card is not as easy as cloning LF card since in order to get the data we need to the auth ID of the card

but good for us MIFARE classic V1 is already broken so anyone if they have a right tool can get the data (Basically we can brute force the UID)

2nd types: MIFARE 4k



we found this type of card when analyzing bank card (debit or credit) because it is used additional encryption. MIFARE DESFire provide three types of version and each of the card used different encryption scheme. Breaking this type of card will require a lot of time.



note: Brizzi is used this type of card ( Thanks God :) )

3rd type:

we found this type of card when analyzing a concert ticket in the form of magnetic stripe tickets or coins. We think this type of RFID used because it is small, compact and flexibel.

Cracking MIFARE Level 1:

As I mentioned in the previous part MIFARE level 1 card security is already breakable and using Proxmarks3 we can get the key of it


proxmarks able to get the UID because the it have a predefined dictionary that can be used to launch dictionary attack. But no worries you can also use your phone to dump this type of card. Link: https://apkpure.com/mifare-classic-tool-mct/de.syss.MifareClassicTool

references:

https://github.com/Proxmark/proxmark3/wiki
https://blog.kchung.co/rfid-hacking-with-the-proxmark-3/
https://www.atlasrfidstore.com/a-guide-to-rfid-types-and-how-they-are-used/
https://www.nxp.com/products/rfid-nfc/mifare-hf/mifare-desfire:MC_53450

Comments

Popular posts from this blog

Having fun analyzing nginx log to find malicious attacker in the net (ง'̀-'́)ง (day 37)

  What makes you sleepless at night? is it because of a ghost or scary stories? is it because you have an important meeting tomorrow? or is it because you have an exam? For me, what keeps me up all night is that I keep thinking about what happens to a website that I just created, is it safe from an attacker (certainly not) or did I missing some security adjustments that lead to vulnerability? well I'm not the best secure programmer in the world, I'm still learning and there is a big possibility that I can make a mistake but for me, a mistake can be a valuable investment to myself or yourself to be better so from this idea, I want to know more about what attackers casually do when attacking a website. Here in this post, I'm going to show you how I analyzed attack to the website that I have permission to design and also some interesting findings that I could get from the analysis Background: All of this analysis comes from the traffic that is targeted to th...

Utilize Pwntools for crafting ROP chain :') (day 69)

who doesn't like pwntools? it is a very versatile tool and can be customized according to our need using the python script but did you need to know that pwntools itself can help us to automatically craft a rop chain for us? so in this post, I will show you how to make rop chain less painful and make pwntools do all the heavy lifting. To demonstrate this I will use the binary challenge callme 64 bit from ropemporium link: https://ropemporium.com/challenge/callme.html Crashing the app: Like any other exploitation process, we need to crash the program by generating a long string pattern to determine the offset. based on the information from the above figure we can see that we required to provide 40 bytes of offset Fun stuff: now this where the fun stuff began write the following python script: as in the guideline of the challenged said we need to chain the function call by first to call the callme_one function, callme_two function and then callme_three funct...

Why you should always cautious on your VPN: Study Case on Broken Cryptography of Android VPN (day 91) ಠ_ಠ

source: https://me.me/i/when-you-make-a-meme-in-europe-but-you-use-22778509 Disclaimer: This blog post is heavily based on https://www.youtube.com/watch?v=ofTts7jlC2Y&t=177s created by Lukas Stefanko. I strongly suggest you guys check his youtube videos it contain many great android security study cases that you can learn free Background: Who doesn't know VPN, right?! It is a wonderful program that lets us maintain the confidentiality of our identity and information while surfing the internet. It is fast and more importantly is "FREE!" there are tons of free VPN applications that you can download in play store and use it in a click of a button. The workflow is also not really that difficult to understand: Source: https://blog.sucuri.net/2020/03/vpn-secure-online-work-environment.html Pay attention to the above figure, this diagram explains the difference in our connection when using a VPN and not using VPN. When using a VPN before we connect to ...