mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-24 15:05:29 -07:00
Beginning tests with VerifyPC and authenticating to change keys.
This commit is contained in:
parent
46473030c1
commit
a508482ae7
1 changed files with 13 additions and 4 deletions
|
@ -1,6 +1,8 @@
|
||||||
local cmds = require('commands')
|
local cmds = require('commands')
|
||||||
local lib14a = require('read14a')
|
local lib14a = require('read14a')
|
||||||
|
|
||||||
|
SIXTEEN_BYTES_ZEROS = "00000000000000000000000000000000"
|
||||||
|
|
||||||
GETVERS_INIT = "0360" -- Begins the GetVersion command
|
GETVERS_INIT = "0360" -- Begins the GetVersion command
|
||||||
GETVERS_CONT = "03AF" -- Continues the GetVersion command
|
GETVERS_CONT = "03AF" -- Continues the GetVersion command
|
||||||
POWEROFF = "OFF"
|
POWEROFF = "OFF"
|
||||||
|
@ -12,6 +14,7 @@ AUTH_NONFIRST = "0376"
|
||||||
PREPAREPC = "03F0"
|
PREPAREPC = "03F0"
|
||||||
PROXIMITYCHECK = "03F2"
|
PROXIMITYCHECK = "03F2"
|
||||||
VERIFYPC = "03FD"
|
VERIFYPC = "03FD"
|
||||||
|
READPLAINNOMACUNMACED = "0336"
|
||||||
|
|
||||||
---
|
---
|
||||||
-- This is only meant to be used when errors occur
|
-- This is only meant to be used when errors occur
|
||||||
|
@ -63,7 +66,6 @@ function writePerso()
|
||||||
-- 0x0B - command invalid
|
-- 0x0B - command invalid
|
||||||
-- 0x0C - unexpected command length
|
-- 0x0C - unexpected command length
|
||||||
|
|
||||||
SIXTEEN_BYTES_ZEROS = "00000000000000000000000000000000"
|
|
||||||
|
|
||||||
-- First, set all the data in the card (4kB of data) to zeros. The keys, stored in the sector trailer block, are also set to zeros.
|
-- First, set all the data in the card (4kB of data) to zeros. The keys, stored in the sector trailer block, are also set to zeros.
|
||||||
-- The only block which cannot be explicitly set is block 0x0000, the manufacturer block.
|
-- The only block which cannot be explicitly set is block 0x0000, the manufacturer block.
|
||||||
|
@ -147,7 +149,8 @@ function proximityCheck()
|
||||||
commandString = PREPAREPC
|
commandString = PREPAREPC
|
||||||
response = sendRaw(commandString, true, true)
|
response = sendRaw(commandString, true, true)
|
||||||
|
|
||||||
commandString = PROXIMITYCHECK
|
commandString = PROXIMITYCHECK .. "08" .. "0001020304050607"
|
||||||
|
response = sendRaw(commandString, true, true)
|
||||||
|
|
||||||
commandString = VERIFYPC
|
commandString = VERIFYPC
|
||||||
|
|
||||||
|
@ -174,9 +177,15 @@ function main(args)
|
||||||
--writePerso()
|
--writePerso()
|
||||||
--commitPerso()
|
--commitPerso()
|
||||||
--getVersion()
|
--getVersion()
|
||||||
proximityCheck()
|
--proximityCheck()
|
||||||
|
|
||||||
|
-- attempt to read VCProximityKey at block A001
|
||||||
|
-- commandString = READPLAINNOMACUNMACED .. "01A0" .. "01"
|
||||||
|
-- response = sendRaw(commandString, true, true)
|
||||||
|
|
||||||
|
-- authenticate with CardConfigurationKey
|
||||||
|
commandString = AUTH_FIRST .. "0190" .. "00"
|
||||||
|
response = sendRaw(commandString, true, true)
|
||||||
|
|
||||||
-- Power off the Proxmark
|
-- Power off the Proxmark
|
||||||
sendRaw(POWEROFF, false, false)
|
sendRaw(POWEROFF, false, false)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue