Bruteforce APDU SELECT using Cardpeek + Lua script

After a couple of hours trying to find free smartcard app on my tinkering time, finally I found this Cardpeek. Simple yet light smartcard reader app.

My objective is to create simple APDU “bruteforce” to the smart card by iterate some EF values using standards APDU SELECT. By bruteforce means that the SELECT command is sent to the smartcard for any possible EF value.

Finding this Cardpeek app + powered with Lua script is enough for me. For now.

The bruteforcing idea is to create iteration of EF value using 2 bytes length, this assumed the smartcard is having 2 bytes EF structures. With this iterations hopefully some approved response (SW1-SW2 = 0x9000) is given by the smartcard, and do further exploit using known approved EF.

Following is the Lua script I created to bruteforce SELECT APDU (or you can download directly here):

And I tested the script using Commuter Line Kartu Multi Trip card, and here is some interesting responses from the card  😀