Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 How to get JPN info + Addres + Photo from myKad

views
     
TSwaykeong
post Apr 13 2007, 01:09 PM, updated 19y ago

New Member
*
Junior Member
34 posts

Joined: Feb 2005
Hi there,

Is there anyone know how to retrieve JPN Info (Name,IC,Gender,etc),IC Photo, and Address from myKad?

I am too noob to do so, preferably using vb.net. :>
narf03
post Apr 13 2007, 03:16 PM

Look at all my stars!!
*******
Senior Member
4,547 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


U need to buy SDK from IRIS, the SDK include of a MyKad reader, driver, installer and SDK. The price is around RM1.5k.
TSwaykeong
post Apr 13 2007, 04:37 PM

New Member
*
Junior Member
34 posts

Joined: Feb 2005
I thought the SDK at the very beginning is free?
narf03
post Apr 13 2007, 04:51 PM

Look at all my stars!!
*******
Senior Member
4,547 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


First of all, I do not work for IRIS tongue.gif

The SDK should not be free, unless IRIS declare its, its protected by license agreements. But the software developed by the SDK can be free. But the software developed cannot be modify, if you need to use any programming languages, i think u will need the SDK.

Any1 else heard of any SDK that can read MyKad free ?
xenon
post Apr 21 2007, 03:15 PM

On my way
****
Senior Member
502 posts

Joined: Jan 2005
From: Selangor

I'm not confident with this code, but you asked for it. Was having difficulty with VB without pointers. I don't like .NET either, makes program slow, and need more memory.
Please comment.

---
There is one minor edit you can do. The "Get Response" command (named Cmd2 in this code) is not strictly necessary. Therefore you can comment out
CODE

           dLength = 256
           retval = SCardTransmit(hCard, pciT0, Cmd2, 5, pciT0, Buffer, dLength)

in Function SelectApp

This post has been edited by xenon: Aug 10 2007, 08:15 PM


Attached File(s)
Attached File  vbSCread.zip ( 31.23k ) Number of downloads: 3196
Attached File  vbSCread__zipfile_.txt ( 31.74k ) Number of downloads: 1162
TSwaykeong
post Apr 22 2007, 01:04 AM

New Member
*
Junior Member
34 posts

Joined: Feb 2005
Thanks a lot. U really fast. Just a day can write out the code. :>
sir_impesto
post Apr 22 2007, 09:29 AM

Enthusiast
*****
Senior Member
729 posts

Joined: Mar 2006
From: Kuala Lumpur

QUOTE(waykeong @ Apr 13 2007, 01:09 PM)
Hi there,

Is there anyone know how to retrieve JPN Info (Name,IC,Gender,etc),IC Photo, and Address from myKad?

I am too noob to do so, preferably using vb.net. :>
*
Why u want? U wanna hack it? brows.gif


TSwaykeong
post Apr 25 2007, 12:06 AM

New Member
*
Junior Member
34 posts

Joined: Feb 2005
no lar...hack it for wat... just wanna retrieve info.
jayoscar
post Apr 26 2007, 10:44 AM

Casual
***
Junior Member
309 posts

Joined: Jul 2005
From: SK, Desa Serdang, Selangor

QUOTE(xenon @ Apr 21 2007, 03:15 PM)
I'm not confident with this code, but you asked for it. Was having difficulty with VB without pointers. I don't like .NET either, makes program slow, and need more memory.
Please comment.

---
There is one minor edit you can do. The "Get Response" command (named Cmd2 in this code) is not strictly necessary. Therefore you can comment out
CODE

           dLength = 256
           retval = SCardTransmit(hCard, pciT0, Cmd2, 5, pciT0, Buffer, dLength)

in Function SelectApp
*
The code u give can decode the MyKad encrypted data?

U must have installedn the MyKad SDK on your dev PC

Declare Function SCardEstablishContext Lib "winscard.dll" _
(ByVal dwScope As Int32, ByVal pvReserved1 As Int32, _
ByVal pvReserved2 As Int32, ByRef phContext As Int32) As Int32
.....

Since you have that Dll, why not share out let me test it, thanks...

(Last time I try regsvr IRIS some dll at other PC face problem, There're some digital cert thingy need to install, Am I right ?)

QUOTE(waykeong @ Apr 25 2007, 12:06 AM)
no lar...hack it for wat... just wanna retrieve info.
*
Even u try to get info from MyKad, but some of the old contain Not enough info for it.

xenon
post Apr 26 2007, 07:33 PM

On my way
****
Senior Member
502 posts

Joined: Jan 2005
From: Selangor

There is no encryption for surface information.
And I do not use SDK. winscard.dll is part of Windows XP.
xflixz
post May 12 2007, 06:31 PM

New Member
*
Junior Member
13 posts

Joined: Apr 2007


how to use it???where can I find the card reader??
Leewy
post Jun 8 2008, 07:16 PM

New Member
*
Junior Member
4 posts

Joined: Jun 2008
QUOTE(xenon @ Apr 21 2007, 03:15 PM)
I'm not confident with this code, but you asked for it. Was having difficulty with VB without pointers. I don't like .NET either, makes program slow, and need more memory.
Please comment.
*

Do you have a program or SDK that can read all the 8 applications on the card?
xenon
post Jun 8 2008, 07:37 PM

On my way
****
Senior Member
502 posts

Joined: Jan 2005
From: Selangor

No. I need a sample of the device in order to reverse engineer.
Reading of JPN, Driving license and passport information is all we can get from a keychain reader or from SDK that we can possibly buy.
This thread gives the info on the 3 applications mentioned above.
http://forum.lowyat.net/topic/355950/+20

PKI application is possible to discover as well, but I don't have credit card to pay for a digital certificate. www.mykey.com.my

Health info is very much unknown and rarely used.
ATM (Bankcard), I don't think people like to use MyKad as Bankcard as doing so can cause increased wear and tear, as well as being worried for privacy intrusion.
Touch 'n Go, using wireless interface. I guess it's not different from normal dedicated TnG. If you need to reverse engineer TnG, consider using plain TnG instead of MyKad.
MEPS cash, I don't even know how easy/difficult to use this application.

This post has been edited by xenon: Jun 8 2008, 07:42 PM
Leewy
post Jun 8 2008, 08:28 PM

New Member
*
Junior Member
4 posts

Joined: Jun 2008
but can we change the JPN, passport and Driving License application through reverse engg?
xenon
post Jun 8 2008, 09:26 PM

On my way
****
Senior Member
502 posts

Joined: Jan 2005
From: Selangor

Logically thinking, updating of license and passport info requires security clearance. Some form of authentication is needed. I believe if the designer of MyKad do it correctly, it should be a cryptographic challenge-response authentication, or perhaps the updated data have to be digitally signed. On the other hand, if a fixed key is used to enable updating, then the fixed key will be easily leaked out. My guess is that challenge-response protocol is used and a Secure Access Module (which is installed to card reader) can prove to MyKad that it is authority now talking to MyKad. I currently do not have any info on the command used for updating. I believe that knowing the command is not a security threat because MyKad will give a different challenge each time, without the SAM, we don't know the correct response to prove to MyKad for the write access.

The card may or may not implement procedures to update JPN info. In practice, JPN info will never be updated. If you change home address, the whole card needs to be changed.
Leewy
post Jun 8 2008, 10:11 PM

New Member
*
Junior Member
4 posts

Joined: Jun 2008
Oh, yes. Once ago, I heard that MyKAD is a one time burnt-on ROM, which means, it is not editable once data is written to that card. But if it is so, how the passport and the driving license details being updated, since they may expire unlike our personal data.

I believe some type of certificates/crytography they may be using to allow these cards to be able to 'write' again
Fazli_Super
post Sep 18 2008, 06:03 PM

Getting Started
**
Junior Member
51 posts

Joined: Aug 2008
thanks again, it that any different between read mykid and mykad? or it is same? how about the myPR?
inblues
post Feb 18 2009, 03:49 PM

New Member
*
Newbie
3 posts

Joined: Jan 2008
Hi Xenon,

Thanks for your knowledge sharing. Do we need a SAM command/device to read mykad info or only IC command will do?

Thanks

QUOTE(xenon @ Jun 8 2008, 09:26 PM)
Logically thinking, updating of license and passport info requires security clearance. Some form of authentication is needed. I believe if the designer of MyKad do it correctly, it should be a cryptographic challenge-response authentication, or perhaps the updated data have to be digitally signed. On the other hand, if a fixed key is used to enable updating, then the fixed key will be easily leaked out. My guess is that challenge-response protocol is used and a Secure Access Module (which is installed to card reader) can prove to MyKad that it is authority now talking to MyKad. I currently do not have any info on the command used for updating. I believe that knowing the command is not a security threat because MyKad will give a different challenge each time, without the SAM, we don't know the correct response to prove to MyKad for the write access.

The card may or may not implement procedures to update JPN info. In practice, JPN info will never be updated. If you change home address, the whole card needs to be changed.
*
narf03
post Feb 18 2009, 04:00 PM

Look at all my stars!!
*******
Senior Member
4,547 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


Plz, this thread is like 2 years ago, start a new 1 with your own title, stop digging up history
xenon
post Feb 18 2009, 06:10 PM

On my way
****
Senior Member
502 posts

Joined: Jan 2005
From: Selangor

Reading JPN info, driving licence info and passport info do not need SAM.
sina8687
post Apr 2 2009, 01:59 PM

New Member
*
Junior Member
47 posts

Joined: Jan 2006
From: Banting, Selangor


is it thumbprint left and right in image data type? i mean is it can be retrieve as jpeg or so on image format.
xenon
post Apr 2 2009, 05:34 PM

On my way
****
Senior Member
502 posts

Joined: Jan 2005
From: Selangor

The thumbprint is in a minutiae format (possibly proprietary and used in MyKad only), not raster image format. My findings show that it stores 4 bytes per minutiae: 1 byte for x-coordinate, 1 byte for y-coordinate, 1 byte for direction, 1 byte for type. I'm unable to find any standard format that matches this characteristic.
baby-doom
post Aug 10 2009, 02:19 PM

New Member
*
Newbie
3 posts

Joined: Jul 2005
hey xenon,
i've downloaded your mykad coding but
i am having problem detecting if mykad has been inserted into the reader, can you help?
i'm working on kiosks and i need that function
thx

This post has been edited by baby-doom: Aug 10 2009, 02:20 PM
hnieef
post Aug 10 2009, 05:08 PM

New Member
*
Junior Member
32 posts

Joined: Oct 2007


i have developing dll.can work with any card reader .gimme ur best price then i will consider sell with source code. smile.gif
xenon
post Aug 10 2009, 05:21 PM

On my way
****
Senior Member
502 posts

Joined: Jan 2005
From: Selangor

baby-doom, refer to http://msdn.microsoft.com/en-us/library/aa380151(VS.85).aspx SCardGetStatusChange and SCardCancel. You might know what to do next. Call SCardGetStatusChange in a separate thread because it blocks.
ayozzhero
post Aug 18 2009, 10:40 AM

New Member
*
Newbie
2 posts

Joined: Aug 2008


QUOTE(xenon @ Aug 10 2009, 05:21 PM)
baby-doom, refer to http://msdn.microsoft.com/en-us/library/aa380151(VS.85).aspx SCardGetStatusChange and SCardCancel. You might know what to do next. Call SCardGetStatusChange in a separate thread because it blocks.
*
Hi Xenon,

I am so surprised to download your codes, where I find the SDK which I bought somewhere resembles them a lot. Yet, after comparison, yours is noticeably faster and easier as you gave the original codes. The SDK, offers only wrapped DLL.

Thank you so much... if there is anyway I can thank you and this forum, please mention.

Well, there are a few new discoveries you've mentioned, such as the fingerprint image, JPJ apps which are not yet included. If you can share how to get them, it would be much appreciated. And... mykids... are they using different methods.

I am thinking to apply the full command sets from JPN. I am arranging the necessary documents and such. It might take sometimes. If I ever get them, maybe there is something I can share here too.

Thank you.


Added on August 18, 2009, 12:13 pmSorry... I found them somewhere in another thread. Just one more thing, since I am using .Net. Let's say, I want to use other MyKad apps, such as JPJ, what are the changes needed here:

CODE

   Public Function SelectApp(ByVal App As String) As Boolean
       Dim retval As Int32
       If App = "JPN" Then
           dLength = 256
           retval = SCardTransmit(hCard, pciT0, Cmd1, 15, pciT0, Buffer, dLength)
           If retval <> 0 Or Buffer(0) <> &H61 Or Buffer(1) <> &H5 Then    'Maybe not MyKad
               currentApp = ""
               Return False
           End If
           dLength = 256
           retval = SCardTransmit(hCard, pciT0, Cmd2, 5, pciT0, Buffer, dLength)
           currentApp = "JPN"
           Return True
       End If
       Return False
   End Function


This post has been edited by ayozzhero: Aug 18 2009, 12:13 PM
rzaneil
post Nov 13 2009, 09:46 AM

New Member
*
Newbie
1 posts

Joined: Nov 2009
hi xenon,

Thanks for your code. Just asking, this code is for reading and display MyKad info, so how to save it in a database eg MS Access. Is it possible and how to do it? can u give steps to do it. I'm only newbie juz cant understand the code well.

Thanks in advance for your kind help
huihao5141
post Jan 15 2013, 05:13 PM

New Member
*
Newbie
2 posts

Joined: Oct 2012


QUOTE(xenon @ Apr 21 2007, 03:15 PM)
I'm not confident with this code, but you asked for it. Was having difficulty with VB without pointers. I don't like .NET either, makes program slow, and need more memory.
Please comment.

---
There is one minor edit you can do. The "Get Response" command (named Cmd2 in this code) is not strictly necessary. Therefore you can comment out
CODE

� � � � � �dLength = 256
� � � � � �retval = SCardTransmit(hCard, pciT0, Cmd2, 5, pciT0, Buffer, dLength)

in Function SelectApp
*
hi Xenon,

how about MYKID ? same with mykad or not?

 

Change to:
| Lo-Fi Version
0.0161sec    0.41    6 queries    GZIP Disabled
Time is now: 16th December 2025 - 04:54 PM