← All talks

Attack on Proximity Card- HID Seos with Flipper Zero - Jackson Ip

BSides Hong Kong · 202540:251.1K viewsPublished 2025-06Watch on YouTube ↗
Speakers
Tags
CategoryTechnical
Show transcript [en]

Thank you. Hello everyone, my name is Jackson Today I would like to use Flipper Zero to attack this Prismatic card I am not going to teach you how to use Black Hat I will just talk about what is going on in this card So let's see how Jun-Yi can attack The story starts with a daily trouble. The company uses HID card, not the ordinary Mi Firenze Classic 1K. I can't directly copy this card. Every time I go to the bathroom or eat, I have to hold the card. I think it's very inconvenient. To solve this problem, I would like to see if there is a way to solve this lazy problem using the method of TECA. Before I officially enter

the topic, I would like to share with you the basic knowledge. I learned it from a friend who used to be a water-dryer. What is the Pondelati Card? Pondelati Card is a short-range card, which is a non-contact card. The feature is that you don't need to insert the card into the slot or the card can be taken. The card contains a chip and a wire to to communicate with the card reader via wireless telephones. The card reader uses the battery to get the card data. This card is used for online applications in the door-clicking, call-calling or transportation. Similar to mobile wireless charging, When you play the card, the card will have a wireless power to stimulate the chip and antenna in the

card. So the card will work, and the card will not need to be delayed. There are three types of contactless card. There are low frequency, high frequency and ultra high frequency. Low frequency is usually the sound of the 1/15 kHz near the speaker. The reading distance is about 10 cm, relatively short. The more typical effect is the early round-trip or stop-and-go entry card. The technology of this type of card is relatively simple, the advantage is that it is not easy to be affected by this metal, it is relatively stable, but due to its relatively small storage space, it is also not protected by the unit, so the safety level will be relatively low. The above example is the HIE PORTS card and EN41 series card.

High frequency refers to the nearby 113.56MHz signal card It is also the most popular signal card at present It is also a passive RFID, but supports more advanced communication settings Such as ISO 1443 or 15693 The reading distance is also near 10cm, and the high frequency card application is quite wide For example, we take the subway, the post office, the company or the door, the elevator card, and the NFC support on the phone are all high frequency The advantage is that the transmission speed is faster and can support B-CAM communication. The security will be higher than the low frequency card. At the same time, the capacity is relatively large. One card can be used as a multi-purpose

card, but it is easy to be interfered by metal. For example, the mid-dare classic series, mid-fair, ESC fire, and the current i-class SOS card, etc. Ultra High Frequency Card, the frequency is usually around 800MHz But actually, 300MHz to 300MHz is also called Ultra High Frequency Card The distance can be from 1 meter to 10 meters Usually used in the base plate, floor, car door, etc. It also needs to be used in the outdoor stations such as the outdoor stations in the country But today the focus is on the door card, so we don't need to explore this part. Since the load frequency card is not protected, anyone can continue to get the content of the card. So most of them now need to transfer to this

Google Guide. After the machine is finished, the main character will be returned. Ethan Castle and H.I.T. Seals. Both are groupers, but the attack rate is completely different. Let's see why one is easier to replicate and the other is more difficult. The first one is MiFair Plus 1K. It is the most common and popular open card. Most hotel doors are basically the same as this one. Although it is very successful on the market, its security is not very good. M1 card with classic 1K, capacity is 1KB 16 cards with 16 sets of cards each set has 4 blocks Each area contains 16 bytes of data The most important thing is that the fourth block of each line area contains

two sets of keys Key A and Key B are used to control the reading and writing limit of the card What you see now is a real communication flow chart of V3.1 Classic Describes the process of exchanging verification between the reader and the card The nonce is a random number produced by the card slot. It should be used to prevent the Repair Attack and increase the probability of the card slot. Unfortunately, the nonce can actually predict the appearance of various attacks. MiFair Classic uses a special encryption algorithm called CryptoOne. It only has 48 bit keys. There were many problems when it was first designed. In early 2007-2008, the MiFair Classic encryption mechanism was studied. Through reverse engineering

and mathematical analysis, we have found the weak points and problems of CryptoOne. CryptoOne was developed by an NSP company It is a typical case of security by security So once the research is done, the way of encryption and encryption will be relatively unsafely broken Later research also found that CryptoOne can be used for relatively simple introduction resources to be fast and broken So now basically as long as there is a suitable tool and time, you can receive all the data and keys in this VFR Card Card. So now all the crypto one to do the card card is considered unsafe. In the previous video, I have continuously turned on the factory's digital card slot. There is a backdoor loop, which increases the speed of the breakage.

After a few minutes, the key can be broken. Simply put, it is not safe to use VFR Classic. There are several attack tools here. Let me briefly introduce them. First, ProgMask 3, PM3, a powerful RFID reader. It has different methods for each card. For media classic, it has Darkside, Neftar, or Blue Force Addiction Related. It can be said that it can be solved in one piece. The big drawback is that it needs to connect to the computer to be able to use it. So the screen is higher than other tools. but it is very powerful Next to it is iCompute XS a handwritten bookmark Most of the metal cards on the market can be recycled There are also

parts that can be disassembled by yourself This is a Mi Fair Classic It's easy to get started but the price is also relatively low The third is the electric plant that has appeared recently, Vapor Zero I just used it to open a TV The reader can also read the card that is currently on the screen. There are also subtitles that can be run. Originally, it is necessary to use the computer to do this Nest Attack. But recently updated, now integrated into MFP, it is not necessary to use the computer to run this Nest Attack. But its natural power ratio is not as good as others. Sometimes it may not be so good. But it is convenient and has many functions. The camera is smaller

than the Vector Zero, specially for the RFI card slot. It can also be used to break the key, but requires some technical settings. The Vector Zero is easier to use. The above video is also signed by the audience. Any of you can already do the first attack of the Mii Fair Classic. Then I will briefly talk about how to do this attack with Frequent Zero. First, the card is placed on the back of the Vector Zero's antenna It will detect the Vector Pass 1 key Then it will run the inside text Most of the time, if you use default password or repassword This card can be broken If the area is not readable or even all areas are not readable It now has a

key called NF key You can use the VIPER to simulate this card and then draw a card to get the key count Then enter the key count to get the key out Or when you get at least one key, you can use the method attack to break the remaining key After getting the final number, you can save it or write it into a magic card or a card that can change the UID You can use the card to activate the door of the door of the door. There are several attacks that we have already known. There is a "Nest Attack" that uses the key that has already been known to break the "Spirit Key". In a few minutes, you

can break a key. DarkSideAttack uses ErrorResponse to estimate the correct key This method takes a long time but is an effective attack method The most primitive is BlueForce or Dictionary If it is not default key or read key, it takes a lot of time to try But due to the M1 card's recovery, it is more troublesome to exchange equipment now. And the upgrade will cost more than the price of the external card. So the M1 card has not been withdrawn yet, it is still recovering. The patent for the M1 card has been expired many years ago So other manufacturers, such as Shanghai Fuda Electronics, have released and repaired the floating cards The latest is the third generation of floating cards But it's not

long-term Last year, Billy Portman discovered the backdoor floating So the third generation of floating cards are easily integrated The Philippine artist discovered the backdoor of the third generation of Hukdan's Mulu card in August. The so-called backdoor allows the attacker to ignore the protection of the counter-reference and directly receive internal information. In the study, it pointed out that the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the

third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the

third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the

third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the third generation of the

third generation of The risk of this loop is no longer required for a large amount of resources or complex attacks. By passing the original card command, you can get all the secret data in the card. The attack time is also greatly shortened. In 2001, NXP discovered that Reflare had a backdoor system and they had to make a new one. But at that time, the product was still in the early stages of production and there were few customers. After a period of time, the Shanghai FUKUTA company launched the FM-1RF-05 series, also known as Midfair's wireless upgrade version. But only this model has gone through several major upgrades. The first upgrade was to repair the Nested's loop. After two or three years, people discovered a

new attack method called Hard Nested. This is the so-called hard card in the market, which was disbanded. After disbanding, they made the second upgrade. This time, the non-slack used for certification is from dynamic to static. The original non-slack is actually used for live-action, so it can be predicted. After the non-slack was put down, almost all the attack methods were not used at that time. But after 2-3 years, it was found to be static nested attack and found to be static noise, so it was re-installed. The third upgrade is the second generation of wireless card, which is now known as the second generation of wireless card. Due to the limited speed of the repair, it was broken again after about a year. But

nested attack can only be broken by the key of half a plus, or at least one key. After the major upgrade, Fukda decided to make the biggest upgrade version. The product model is called S. This is the third generation of the Hulu card. The Static Lefter is sealed. Until now, until the fact that the backdoor was discovered by Philip. After revealing the third generation of backdoor loophole, it makes the actual attack easier to execute. In the latest version of Freakless Zero, the backdoor attack and the nest attack have been included in the MFT. Using its NFC detect all function, it can be done. According to its paper, in the front of the third generation, The backdoor key is the same as

the original backdoor key of the second generation or the first generation of NXP. But when I tried it myself, I could only make the third generation. Maybe I was wrong and the result was a bit wrong. So I asked the backdoor company first. To sum up, Befair Classic, especially for crypto one, has been integrated into the whole year. We do not recommend using it for long-term use with high security requirements. If you want to upgrade your card or system, you need to choose a more secure method, such as HID Seals, Befair DSC Fires, etc. to avoid being broken. Is HID Serious Card absolutely safe? Let's continue to see what attacks can be prevented by its high security card. First of all, this HID Serious Card is a 13.56MHz

high-frequency card, but the security is far superior to the B-Fair Classic. Since the initial design of the Serious Card by HID is to replace some old techniques that were easy to break before. For example, HID POS or iClass SIM card Actually, XIE card is more like a small security chip with a smart card system inside to add and solve the problem According to the driver card app, I don't know if it is Every time communicating with Ducati, there will be a double-sided to verify each other's identity and ensure that only the legal recording machine and recording video can be read. In addition, we used this SIO platform, Secure Identity Object, Simply put, it is to put the

information required to identify the door-closing system in a space with many layers of glass, and ensure that the correct key can be obtained, and prevent the outside world from directly taking or repurposing it. which means that it is basically impossible to deal with Serial with Mi Flip I also tried to use Flip.Serial to get Serial card It can get a ISO 144A-3A But we can't read other information in depth This UI will change every time it is read Because the current addition method is no longer the "Gypto-1" So there is no loss calculation Using this "ADS" or "3DES" plus this "mode_trigger_sum" Every time it reads the same result is different Only the number of the security guard is useless, it is obvious that the security

guard is safe at present, there is no current traffic, no way to break through. Continue to search, you will find the current attack method and special effect, which is Downgrade Attack. Downgrade attack is for the compatibility of the system For example, some companies need to keep new hardware But the old hardware is not so fast to recover To smooth the transition, the card machine will simultaneously use the new and old card system In this environment, although there are still many decoding devices for C-OS card But in fact, the default is that it can read iPads or close to 125kHz C-OS card This kind of commercial setting will sometimes be written as Migration Mode or Legacy Mode If the decoder is used with an

old and unsafe system We can use a new Seals Card, a safe Seals Card, to change to a non-safe system So that the reader can read our card under a relatively low-security agreement In order to achieve the purpose of opening Before continuing to talk about downgrade attack, we need to understand what is PACS and the Wiggin Agreement Because our purpose is to use this data to do downgrade attack If we can't get it, we can't do it PACS is the physical access control system Each control card is actually a identity document There is a set of data to prove who is the owner of this card. This set of data is called PACS data. When we

are shooting cards in the card system, the system does not care about whether you use the MiFRE Classic, iClass or Serious card. It only cares about the information in this set of data, which is the card representative. Each card contains a set of PSS data, usually includes the card number and the long code The most common is the 26-bit Regan format, which is a long code of 8 bit plus a card number of 16 bit Then add the front and back test codes Since these data are not added when transmitting, it is easy for people not to obtain Simply put, PXDS data is like an account in the world of encryption If you get your account, you can try to create a fake account to pretend

to log into the world of encryption We now know that PXDS is the target we want How does this system send to us from the card reader? It is the function of Regen.Go WGAN is one of the most common communication devices in the door-to-door system. It has not been changed much in the last few decades. Its working method is very simple. First of all, it is a single-way communication. It is only to transmit data to the door-to-door system. In addition, it uses two data to transmit, data 0 and data 1 respectively. The data is actually a pin test, no addition When we do the test, the reader will first get the BACS data it needs from the card And then it

will send it directly to the system through the Read-On Code If we can get the data directly from data 0 and data 1 We can directly intercept the BACS data from the card Let's go back to the attack plan Why is this concept so important to Downgrade ATT&CK? First of all, the Downgrade ATT&CK strategy is to allow the doorkeeper to accept low-security security cards such as HIDI+ or 125 QHz POS cards But this card also requires a legal identity The doorkeeper system will accept it, namely BACS data Since we can't get the PACS data directly from the SIROS, because we can't get the entry of the PIC, and the entry can be opened only after the confirmation of the two directions. This means we can't directly copy

the SIROS card. How can we get the PACS data? Since we can't read the card directly, we can read the card without reading the card, but read the data of the system by the card reader. For example, use an updated card reader called Vectorized Reader to read the card of the CEO, and take the content of the system by the card reader, and get the card number that it uses to display the PIN text, or use the official card reader. If the card is standard key, with some special settings, you can get the BXCS data in the card. After getting the data, prepare an old-fashioned card to write these data, such as the legacy of the i-PASS. Since the i-PASS legacy can be downloaded

early, so it is not difficult to write the ID of your choice. Or if you feel that it is not suitable, If the 6-card machine supports low frequency, you can add it to T577 Because 125kHz is not added to the crosscard Finally, I will try to read the card to see if the door is open If it accepts, it will open the door for us to enter After understanding the attack idea, we can identify what tools can be used on the hand Just mentioned that the PM3 has a higher door threshold iCopyXS has a plugin called ICS Decoder for iCloud SD or CELOS This is very easy to use As long as you answer the main machine, you can directly read the data in the

CELOS card But you also need to buy it from us The price is almost the same as the main machine Of course, the price is not the iCopyXS problem, it's mine But I don't want to go to the bathroom to buy a new card with a 400 euro discount. Is there any cheaper solution? Yes, there is. With the help of Google, we found that there is already a set of free card sales expansion. It is specifically for this XID iPlayer Sales Card. This is called NARC Expansion, which is also called SAM Card. There are two ISO7816 SIM card slots on this board, which can be inserted into the so-called SIM card security access module. This makes the SIM card able to communicate

with the SIM card, and then use the SIM card to handle high-security security security and security management. What is SIM card? For HID, it is a official security lock. In HID's remote control, you can see the sound of the key. It is used to transfer the key to the new product. If the HID's SELOS or iPaaS system uses this standard key, it means you don't have to do any special processing. Basically, you can access the SELOS card with this SEL. The work here is the same as the previous one, but using Flipper to make the CIO's card machine and communicate with the SEM. Let the sound handle all the verification, challenge response, and SIBO solutions The only difference between the

two is that the single card machine will send the data to the system And the data will be directly collected here So in theory, you have this set of things, it is like a paper that can read the sales card The situation is now clear, you only need to buy the board and a sample. The actual board I bought at that time was only $79, plus $50 to buy a sample of the Seals. Obviously, compared to the previous iCopyExcess, this format is more suitable for me. But if you want to buy, unfortunately, this version is no longer available. If you want to buy, you have to buy this Flipper Vista. It costs HK$190, but it has a sound

system inside, so you don't need to buy it from outside If you want the complete version, it costs HK$230, and it has an Ultra High Frequency module for you to read Although it is much more expensive, it is cheaper than the price of 425 euros If you want to do it yourself, the original NASAM Expansion Board can be made by yourself on GitHub. Let's talk about how to attack. First, you need a fast disk, a SAM, and a standard key of HID. Also, you need to prepare a FIGURE-0. Fast disk is used to to make the Vector Zero and the sound communicate To control the Vector Zero to the 6-bit board we need an app called SIDA If you use Momentum Frameware the default is already installed

First, you need to check if there is no SAM, if not, you need to stop it. Since this application is more like RAM, it will restart your Vector Zero when you open it. You need to change the SSPAC to the default small disk to disassemble your RAM. The second step is the data in the reading card In this SETA1, because I just mentioned that SUS belongs to the 14433A agreement So we choose to read the ISO 14433A Then read the CIOs in the next reading This time you can see that the data in the CIOs has been successfully read This is the 26-bit data, which is also the most common reading protocol After the selection is completed, we can save it to PicoPath

Why save to PicoPath? Because this is an old-fashioned ICAS format Made from ISO 15693 and 144 3D So we use this format to store downgraded data In theory, this step can be done with the break-touch control But when I actually use it, it is more troublesome to have so many buttons. The optical bus cannot be saved directly to a shortcut or directly saved to a shortcut on the phone to open it. So I decided to write it in an old-fashioned, relatively low-security iCast Magazine. This time we are going to the Pro Class Game The latest version is called XIEI Class Go to the Serial Card Data that we just saved Then select Wire and write

it back into the old card It looks like the seventh block In theory, the card of Downgrade Attack is completed The last step is to see if it is accepted or not You can see that Jackson Yee is my opponent This is the card that my company's CEO opened with his Zero card. This is an old iCard Fantasy card. Why is it so strong? It is obvious that this card is not acceptable because it does not have PSCS data. I used Paper Zero to write it in. I can open the door with this card. Finally, I can film myself. Obviously, I have to bring a card to the bathroom to eat and go to the bathroom. There is no difference. The

difference is that I can't move the company card. But after writing it in other places, I can make it a hand. I can now divide my card into two parts and use it for other things. So I have now put this I-Card Legacy into my new card holder. Now I don't need to bring my card when I go to the toilet I only need to bring my ring The ring is also multi-use I put a few of my local items in it Let's refresh it This time, although the whole process is using this... Hey, wait, let me turn on the full screen Yes, first of all, the whole process is using this... I have no money to pay for the credit card, but I want to

emphasize that the NAPS card can only read the HID CIOs credentials and cannot be entered. In other words, even if Antecca has this NAPS card, it cannot make a new CIOs card. Because the CIOs card is needed to help the HID backend system. This is not necessarily the function of the module table, but in most cases it does not affect the downgrade attack. Because we can only use the PCS data to run the control system. I just talked a lot about the technical details of downgrade attack. But how should we prevent downgrade attack? Let the attackers easily go through the new system of security security. First, let's review the core of the downgrade attack. What is the problem? In order to use this old

technology to open some low-security channels such as low-fiber or iCash legacy, the attacker can use old colored cards to bypass the security of the new colored cards. The last step is to turn off the Legacy Mode. Legacy Mode is turned on. If the company needs to pass through, or if the system is IT or HR, and you are afraid that the system will not work, and you can't enter, and you have kept the default setting, then the system will be turned on. The second point is that you can use the ELECT KEY, which is self-sufficient. If you don't use the standard key, the SAM that I just bought, which is the SAM that you can buy

now, actually the default key is the default key of HID. If you use the default key, even if I hold this SAM, I can't explain the content of this card. But it's the standard key when it's default. And if you don't take the initiative to submit it, the HRD company won't be able to provide you with the settings to submit it. So you have to ask them first. The third point is to use OSDP's integrated communication. We just mentioned that many communication systems are still using this region portal to transmit data. But the biggest problem is that region portal is only for sending and receiving information. Just like HTTP, I will make a man-in-the-middle in the middle. After the

information is sent to the middle, I can use the same information to send to the card system to make it open to me. OSDP can also be added, and there is also an E2E authentication, so that the system can do the same when it is reading the card, and not directly accept its ID. Even if you use HID Serial, and set the legacy mode, and the key, there is a chance to encounter a relay attack. But since the screen book is related, I didn't talk about the relay attack just now. Simply put, there are two devices One is to play cards near the reader The other is to play cards near your card Then they will send the information to the reader The card

is playing with the reader And the reader thinks that you are at the door Actually you might be drinking coffee downstairs But how to defend it? Because there is a left hand hand-to-right hand action in the middle So the delay is longer than the normal card So if the exchange time is too long, you can continue to verify it In addition, you can also check if the card and the two different places of the card are locked in a short time You can also check the alarm Finally, check the safety of the door and the red team. That's it. I have nothing to say. Any questions? I want to ask where the bus is. You can ask

this question. I will ask you to buy it. No more questions? No more questions? Actually, I brought Victor Zero, a NARC Sandbox, and a Zero card, and an iCard Magazine card. If you are interested, you can come and get me. That's all for today.

It's a very interesting feeling. Everyone, please give a little applause.