-
Notifications
You must be signed in to change notification settings - Fork 164
/
parse-credit-card-information.yml
52 lines (52 loc) · 1.52 KB
/
parse-credit-card-information.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
rule:
meta:
name: parse credit card information
namespace: collection/credit-card
authors:
- "@_re_fox"
scopes:
static: function
dynamic: unsupported # requires mnemonic features
mbc:
- Data::Check String [C0019]
examples:
- 1d8fd13c890060464019c0f07b928b1a:0x402860
features:
- and:
- 3 or more:
- instruction:
- mnemonic: cmp
- number: 0x5E = '^' (Track 1 separator)
- instruction:
- mnemonic: cmp
- number: 0x3D = '=' (Track 2 separator)
- instruction:
- mnemonic: cmp
- number: 0x25 = '%' (Track 1 start sentinel)
- instruction:
- mnemonic: cmp
- number: 0x42 = 'B' (Format code)
- instruction:
- mnemonic: cmp
- number: 0x44 = 'D' (Format code)
- instruction:
- mnemonic: cmp
- number: 0x3F = '?' (Track 1 & 2 end sentinel)
- instruction:
- mnemonic: cmp
- number: 0x3B = ';' (Track 2 start sentinel)
- not:
- description: if a function also compares these non-hex characters it's most likely NOT parsing CC data
- and:
- instruction:
- mnemonic: cmp
- number: 0x6D = 'm'
- instruction:
- mnemonic: cmp
- number: 0x6E = 'n'
- instruction:
- mnemonic: cmp
- number: 0x6F = 'o'
- instruction:
- mnemonic: cmp
- number: 0x70 = 'p'