Literatecode

Smart Card Digging Utilities

Jun 3, 2007

Smart Card Digging Utilities (SMACADU) is a set of very simple command line tools to poke around smart cards. By using these tools, you may explore an unknown or an obscure smart card to reveal its layout and functionality. There are three tools in SMACADU: smacdig, smacget, and smactty.

smacdig

This tool let you map all existing objects within specified Dedicated File, even if the smart card does not have DIR command or it tries to hide an object from DIR. Such mapping is a continuous procedure which you may terminate any moment by pressing a key. You may also specify an initial DF path, as well as an initial object ID.

smacget

You can dump any publicly accessible Elementary File (EF) from a smart card to file by using smacget. Just specify the full path of EF and it will be extracted to file named as EF's ID.

smactty

This utility is the APDU console that you may use to send commands directly to a smart card. To use this tool, you need to know what is PC/SC and, at least, C0 A4 00 00 02 3F 00 must ring some bells.

Run any of these tools without parameters will output usage info and a list of available smart card readers. You must specify desired smart card reader by its name as a first parameter then. You do not need to specify a whole name. A unique substring from the name would do just fine. For smactty, you may define characters inside APDU commands as is, without remembering their hexadecimal representation by using "-" in front of a character. For example, you may simply type -p-a-s-s-w-o-r-d instead of 70 61 73 73 77 6F 72 64.

Originally, SMACADU is a set of Windows console applications to compile with Microsoft Visual C compiler. If you want to port these utilities to GCC/Linux, then feel free to do so. The source code is below.

Download


Contact Us

E-mail

hello@literatecode.com

 

 

Regular Mail

Literatecode
22 Sin Ming Lane #06-76
Midview City
Singapore 573969