Amex / Gemplus Smartcard Reader – Usage and Hacking

View Post

Looking for Smartcard info downloads? You have been directed here and download links are below.

Many many years ago I had a post on my old website, artofconfusion.org, oulining the research I did to get the old free Amex smartcard readers to work on Linux. Analytics are showing that people are still looking for the post, so I have added the info and doc downloads here.

A few years back american express introduced the Amex blue, the first US credit card using smart card technology. During the release of this card Amex was giving away, free of charge, no questions asked, a card reader to be used with their cards. This page will provide an outline for hacking that gcr415 smart card reader you were lucky enough to acquire.

The gcr415 is no more than the gemplus serial smart card reader with some fancy Amex stickers on it. Any software or data-sheets related to the gemplus serial will work with the gcr415. 

My progress

Windows: found appropriate driver for my windows 2k unit installs and works to install the driver. Use the driver i have it in the archives for gempc410 serial card reader. Use the install exe then go to the add hardware wizard -> add other device and it should appear with 4 choices. The driver that works is gemplus pcr410p serial smart card reader. Once its installed it is listed in the hardware section under smart card readers. The utility recognizes the device and can tell when a card is being inserted and removed i don’t have blank smart cards yet so its difficult to play further.

Linux:

Got the goodies together to get the card reader working in Linux (slack 10 kernel 2.4). First you need PC/SC-lite installed then you install the driver. Once it installs you need to set up a proper /etc/reader.conf file. You can look at mine:

$ cat /etc/reader.conf

FRIENDLYNAME "GemPC410"
DEVICENAME /dev/ttyS0
LIBPATH /usr/pcsc/drivers/libGemPC410.so.0
CHANNELID 1

it works and if you run

pcscd –fg stdout

you can watch the daemon at work…

Then if you install the perl wrapper for pcsc you can use the tools like pcsc_scan in another terminal or after running the daemon in the backgroud. Cool thing about the perl wrapper is you can build runtime compiling apps to work with the reader.

Smartcard / Gemplus Related Docs

For more information and downloads, check out my old smartcard research page.

The Amex serial Smartcard Reader:

Let’s crack it open and see what’s inside:

Smartcard Dimensions:

Boot Partition in Ubuntu Keeps Running out of Space After Upgrade to 18.04

After I upgraded to the latest LTS from Ubutnu, namely 18.04, I was finding I could never have more than two kernels installed at a time. /boot kept running out of space and updates would fail. Running sudo apt autoremove && sudo apt autoclean would resolve the issue until the next upgrade. This was tolerable until I needed to install both a generic and a low-latency kernel.

Looking at my df output it almost seemed as if the upgrade swapped my efi and boot partitions. My efi partition was 500MB and my boot partition only 250MB! The solution I found was to resize the partitions to make the efi partition 100MB and the boot partition 650MB. This process wasn’t as easy or smooth as I initially thought, so I figured I would document what it took to make it work.

Step 1 – Boot a Live USB

First thing you need is to have a liveUSB from ubuntu that you can boot into:

Create a Bootable USB Drive in Ubuntu

Boot into this drive, selecting “Try Ubuntu Without Installing”

Step 2 – Resize the Drives

After Ubuntu boots, open a terminal and type sudo gparted. In gparted, resize your efi drive to 100MB first, then resize your boot partition into the remaining space. Make sure no flags are set for the boot partition and the boot,esp flags are set for the EFI partition.

When you resize the EFI System Partition, it will change to fat16. This needs to be reformatted back to fat32 to work. Once this is done right click on efi partition, and select New UUID. Once this is done apply all settings and quit gparted.

Step 3 – Install and Run Boot Repair

Now you need to install and run boot repair from withing the live USB environment.

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Once boot repair loads, click the recommended repair button and follow onscreen instructions.

Once you are done, reboot!

Amazon Kindle Fire 5.3.1 Hacked – Rooted and new Rom

I just purchased a Amazon 5th gen kindle fire to use as a ground station for my drones. The device supports OTG and has the power needed to run the 3dr usb telemetry device.

Out of the box the fire is kind of useless for anything but an e-reader amazon buying tool.  Rooting and a ROM upgrade solves this! It is fairly simple, however the process is time consuming with lots of waiting (have something else to do like a book or a movie while you’re waiting on certain processes).

Step 1: Make sure you have 5.3.1.0 fire OS installed on device
Go to Settings -> Device Options -> Software Updates to check the version. My device shipped with 5.3.1.0 so I did not need to load a different firmware. Your mileage may vary.

If version is less than 5.3.1.0 follow This Guide instead.

If version is greater than 5.3.1.0 follow these instructions to install the 5.3.1 firmware. download from here

DO NOT attempt to downgrade a > 5.3.1.0 device below 5.3.1.0!!! This it will BRICK your fire.

Once version is 5.3.1.0 go to step 2

Step 2: Reset to factory settings
Go to Settings -> Factory Reset and perform a factory reset. This will reboot the device.

When device boots skip all set up and do not connect to WiFi yet (this will slow down any unwanted update process).

Step 3: Enable Developer Mode
Go to Settings -> Device Options and tap the build number seven times to enable dev mode.
Go to Settings -> Device Options -> Developer and turn on USB debugging and ADB.

Step 4: Download needed files
Download the latest SuperTool from RootJunky and extract somewhere you will remember.

Download the latest Nexus ROM for Fire Tablet but DO NOT extract it.

Step 5: Run SuperTool
From a command line navigate to the SuperTool folder and run the appropriate file. In Linux the command is
$ ./3-Amazon-Fire-5th-gen-linux-mac.sh
You will see a screen like this:

Press 2 and Enter to root device. First it will install KingRoot to your device which you will then have to run from your device when directed to do so. KingRoot will ask you to connect to WiFi.

You will likely have to run KingRoot repeatedly before it will work. Time to grab a book or a movie as this part takes time. Each time you run KingRoot it will reboot your device a few times and show progress on the screen. Each attempt takes about 10-15 minutes or more. After the first attempt I unplugged my device from the computer and had to run KingRoot a total of 4 times before it worked. Just keep trying.

Once root is gained plug your Fire back into the computer (you may need to cycle the ADB setting on your device for it to be recognized) and continue the SuperTool process following all instructions there. This will install SuperSu which will need interaction from you on the device. Follow the setup procedure according to the instructions in SuperTool.

Once this process is done run “Block OTA updates” to prevent accidentally losing root access.

Step 6: Install Rom via FlashFire
While still in SuperTool install FlashFire (option 6).

From your computer copy the zipped ROM file downloaded in Step 4 over to the INTERNAL storage of your Fire device.

On your device run FlashFire and follow these steps exactly, otherwise you risk the installation having problems:

Select the red plus (+) button to expand a selection of options, choosing Wipe.
Select System data, 3rd party apps, and Dalvik cache if they are not already checked.
Click the red plus (+) button again and choose Flash ZIP/OTA.
Search for the Nexus ROM that you’ve copied over and choose it.
Automount and Mount /system read/write need to be unchecked.
Drag Wipe to the top of the queue.

Hit the flash button to start the process.

This will take a few minutes and the screen might go blank for a while. It will eventually boot into the new ROM.

Step 7: Enjoy!
With new ROM installed be sure to update Google first. After it updates clear google app and framework cache and reboot.

Install apps. You will need EVERYTHING as this is a very vanilla ROM.

OTG works great with APM/Tower or DroidPlanner software.

Much faster, full play store support and NO ADS! Yay!

Configure Tarot 2D Gimbal on Linux / Wine

Having trouble getting serial devices in Linux to show up as COM ports ( eg, COM1 ) in Wine? So was I. Getting the correct software to configure your Tarot Gimbal and getting the com ports to work can be a nightmare.

Problem solved! Read on!

So you have a Tarot Gimbal and the included USB programming dongle.

On your *nix machine ( I am using Ubuntu, your mileage may vary ):

Make sure user has dialout privileges:

$ sudo usermod -a G dialout username

Log out and back in.

Install Wine:

$ sudo apt install wine

Configure wine to run XP

$ winecfg

Add required items to Wine registry (~/.wine/system.reg):

[Hardware\\Devicemap\\Serialcomm] 1231984861
"Serial0"="COM1"

More info here: https://onetransistor.blogspot.com/2015/12/wine-serial-port-linux.html

Plug in your USB to serial adapter to computer. Link device (ttyUSB0 in my case) to Wine com1

$ ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1

Download programming software: ZYX-BMGC-EN_V1.5.zip

Uncompress the file, right click on main application and select run with Wine.

Plug in connector on USB to Gimbal.

Select COM1 in software and click connect.

Power on drone/gimbal.

Hack Away!

Travel Hacking!

I have been so caught up in building my homestead that I haven’t traveled in a while. I mean really traveled. Sure, I have been to Costa Rica and Hawaii recently but those trips were far enough apart that my frequent flier miles expired.

Well, I have the bug again and need some serious adventure in my life. I read a great book called Big Travel, Small Budget which has me truly inspired. Not only does he discuss how to travel for cheaper than it is to live stationary, he gives some great tips on how to make money traveling or to travel for almost free!

Currently I am playing with what is called travel hacking. It’s basically using both your travel and standard expenses to earn frequent flier miles that can get you all sorts of stuff for free.

I have a United Mileage Plus Account and am getting miles from the following places:

Chase United Explorer Card: I just got approved for this card. If you aren’t the type that pays your entire card bill at the end of the month, this part of travel hacking is not for you. However I do pay my whole balance so I will use this card where I would normally use my check card from my bank, which is for most of my purchases. This card offers bonus miles for signing up, 2 miles for every dollar spent on tickets from United, 1 mile for all others. Couple this card to your united dining membership for massive miles scored when you dine out.

United Affiliates page has links to all sorts of programs from dining to online shopping.

FTD Florist: You can link to FTD from the United Affiliates page and get miles there. Just earned 1700 miles for getting my mom some Mother’s Day flowers. Probably sending some to Grandma too!

Opinion Miles Club Earn miles for taking surveys. I had to start like 10 different surveys before I got to one that actually let me finish. Time to try for another. I have been at this like an hour and have written this post and earned 300 miles.The miles were posted instantly! Much better than the FTD ones ( though not as many! )

E-Miles Earn miles for completing offers and surveys. Similar to above but likely more simple. Also has as some good join bonuses. No affiliate link I could find so far. Posts miles quickly to your account but only in multiples of 250. If you already donate to non-profits ( like me ) then you can earn some extra miles here for doing so.

The key is to earn miles on things you do anyway. Miles lead to free air travel, upgrades and all sorts of other travel related expenses.

Play Pocket Mortys on Linux!

 

As a huge Rick and Morty fan, I was eager to play Pocket Mortys. Alas, it is only available for Android and therefore won’t work on my Ubuntu Phone.

Don’t panic! There is a solution! This howto might also be useful to anyone having trouble getting Google Play Services to work with Genymotion.

Step One:

Install Virtualbox www.virtualbox.org
This is pretty straightforward. Instructions are on the website

Step Two:

Install Genymotion www.genymotion.com
You will need to create a login. Use the free version.

Step Three:

Start Genymotion. Click the plus sign to add a new machine. Select Custom Phone 5.1. This will download and install the machine.
Once the machine is installed, start it from Genymotion. If you get a working phone simulation it’s time to move to the next step.

Step Four:

Install google apps. Genymotion doesn’t include google apps so you will have to install it. The only one I found to work was downloaded from github, here https://github.com/cgapps/vendor_google/tree/builds/x86. Be sure to download the zip and the md5 sum to ensure the file downloaded properly. Be sure to use the x86 version and do not install the arm translator as described in other howtos.

Step Five:

Drag the zip file downloaded from the link above from your downloads folder to the virtual phone from step three. There will be a transfer dialog then a window popping up asking if you want to flash the archive to the ROM. Click OK. You will be notified when the update is complete. Click OK and close the virtual phone window.

Step Six:

Start custom phone in Genymotion. Once the phone boots, open the google play app and update it. Once updated click OPEN and it will then ask you to update google play services. Run that update and when it’s done click OPEN. You can now install Pocket Mortys. The first time you run PMort you will be asked to install google play games.

Screenshot_2016-01-24_19-54-54

Screenshot_2016-01-24_19-55-21Screenshot_2016-01-24_19-57-34

 

Kombucha Recipe

We can all thank the Angelfish for giving me a reason to post this 🙂

The following recipe is for 1 gallon of ‘buch. It can be halved/doubled etc. to match your needs. All cooking times stay the same.

You will need:

Kombucha Brewing
Kombucha Brewing

2 quart pot
1 gallon of good water
1 cup sugar, organic unrefined preferred
1 SCOBY (AKA the Mother… a Symbiotic Colony Of Bacteria and Yeast)
1 cup starter tea
8 oolong, green or black tea bags
1 g glass jar. NO METAL!
1 piece of cotton cloth or paper towel. Holes in cheesecloth are too large, if using cheesecloth use at least 3 layers.
1 rubber band

Procedure:
Clean hands and all utensils with distilled vinegar after washing with NON-Antibacterial Soap.
Bring 4 cups of water and sugar to a boil.
Once boiling add the teabags, count to ten, then remove the pot from heat source.
Put the lid on the pot (leaving tea bags in) and wait for 5 mintues.
After 5 minutes remove the lid and add some water to fill up the pot.
Wait 5 more minutes.

SCOBY Farm!
SCOBY Farm!

Remove tea bags and squeeze them out. Let this “sweet-tea” sit and cool off for at least 20 minutes. Ideally temp should be below 110 degrees Fahrenheit before continuing.
Put SCOBY and starter tea in brewing jar. Pour sweet-tea into jar. Fill remaining space with water up to 1.5-2 inches from top of jar. Stir with WOODEN or PLASTIC spoon.
Cover jar with cloth and secure cloth with rubber band. Put jar in cool dark place (pantry or cupboard). Do not disturb jar while fermenting.

In a few days a new SCOBY will start to form on the top of the tea. After about a week start tasting your brew using a wooden or plastic spoon. When you like the flavor, you are done! Bottle it up and enjoy. Google for more recipes and flavoring ideas.

Baby SCOBYs
I got SCOBYs, who wants one???

NOTES:
Never expose SCOBY or ‘butch to direct sunlight.
Never expose brew to any type of metal.
When you first start brewing, there will be more yeast than usual.

It’s brown and gross looking. This is normal. Unless your SCOBY is super fuzzy everything is probably normal. As your SCOBY adjusts to it’s new environment it will get whiter and produce less yeast strands.
After brewing is finished, the new SCOBY can be separated from the old to start a new batch, make additional batches, give to a friend, make bio-pleather, etc.

After the first harvest, bottle all but a cup or two of the brew and just pour some new sweet tea in the jar and brew it.