Skip to content

Commit

Permalink
Update PrivateKeys.yaml (#1459)
Browse files Browse the repository at this point in the history
Co-authored-by: Mike Cohen <[email protected]>
Co-authored-by: Mike Cohen <[email protected]>
  • Loading branch information
3 people authored Jan 3, 2022
1 parent 5c4390e commit dc02b45
Show file tree
Hide file tree
Showing 11 changed files with 387 additions and 10 deletions.
124 changes: 115 additions & 9 deletions artifacts/definitions/Linux/Ssh/PrivateKeys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,129 @@ description: |
private keys are more risky because an attacker can use them without
needing to unlock them with a password.
In particular, AWS instances are usually accessed by way of an SSH
key pair generated by the AWS console. This key is not encrypted by
default and it is possible that administrators simply save the key
on their systems without encrypting it.
This artifact searches for private keys in the usual locations and
also records if they are encrypted or not.
also records if they are encrypted or not. Not all key types are
supported
NOTE: In order to encrypt your private key run:
```
ssh-keygen -p -f my_private_key
```
Change the glob to /** if you would like to search the entire filesystem.
Be aware, this is an expensive operation.
## references
- https://attack.mitre.org/techniques/T1145/
reference:
- https://coolaj86.com/articles/the-openssh-private-key-format/
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html

precondition: SELECT OS From info() where OS = 'linux'

parameters:
- name: KeyGlobs
default: /home/*/.ssh/id_{rsa,dsa}
default: /home/*/.ssh/{*.pem,id_rsa,id_dsa}

sources:
- queries:
- SELECT FullPath,
Mtime,
if(condition={
SELECT * from yara(rules="wide ascii:ENCRYPTED", files=FullPath)
}, then="Yes", else="No") AS Encrypted
FROM glob(globs=KeyGlobs)
- query: |
-- For new OpenSSH format
LET SSHProfile = '''[
["Header", 0, [
["Magic", 0, "String", {
"length": 100,
}],
["cipher_length", 15, "uint32b"],
["cipher", 19, "String", {
"length": "x=>x.cipher_length",
}]
]]]
'''
-- Device major numbers considered local. See Linux.Search.FileFinder
LET LocalDeviceMajor <= (
253, 7, 8, 9, 11, 65, 66, 67, 68, 69, 70,
71, 128, 129, 130, 131, 132, 133, 134, 135, 253)
// Only search local filesystems
LET RecursionCallback = "x=>x.Data.DevMajor IN LocalDeviceMajor"
LET _Hits = SELECT FullPath,
read_file(filename=FullPath, length=20240) AS Data
FROM glob(globs=KeyGlobs, recursion_callback=RecursionCallback)
WHERE Size < 20000
LET Hits = SELECT FullPath, Data,
base64decode(
string=parse_string_with_regex(
string=Data,
regex="(?sm)KEY-----(.+)-----END").g1) AS Decoded,
parse_string_with_regex(
string=Data,
regex="(BEGIN.* PRIVATE KEY)").g1 AS Header
FROM _Hits
WHERE Header
LET OpenSSHKeyParser(FullPath, Decoded) = SELECT FullPath,
parse_binary(accessor="data", filename=Decoded,
profile=SSHProfile, struct="Header") AS Parsed
FROM scope()
-- Support both types of ssh keys dependingg on the header
SELECT * FROM foreach(row={SELECT * FROM Hits},
query={
SELECT * FROM switch(
a={
-- new format
SELECT FullPath,
Parsed.Magic AS KeyType,
Parsed.cipher AS Cipher,
Header
FROM OpenSSHKeyParser(FullPath=FullPath, Decoded=Decoded)
WHERE Header =~ "BEGIN OPENSSH PRIVATE KEY"
},
a2={
-- encrypted rsa key from e.g. putty
SELECT FullPath,
"PKCS8" AS KeyType,
parse_string_with_regex(string=Data,
regex="DEK-Info: ([-a-zA-Z0-9]+)").g1 AS Cipher,
Header
FROM scope()
WHERE Header =~ "BEGIN RSA PRIVATE KEY"
AND "Proc-Type: 4,ENCRYPTED" in Data
},
b={
-- unencrypted rsa key from e.g. AWS
SELECT FullPath,
"PKCS8" AS KeyType,
"none" AS Cipher,
Header
FROM scope()
WHERE Header =~ "BEGIN (RSA )?PRIVATE KEY"
},
c={
-- old format encrypted
SELECT FullPath,
"PKCS8" AS KeyType,
"PKCS#5" AS Cipher,
Header
FROM scope()
WHERE Header =~ "BEGIN ENCRYPTED PRIVATE KEY"
},
d={
-- catch all for unknown keys
SELECT FullPath,
"Unknown" AS KeyType,
"Unknown" AS Cipher,
Header
FROM scope()
})
})
30 changes: 30 additions & 0 deletions artifacts/testdata/files/keys/EncryptedRSAKeyPair.pem
Original file line number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PGiLp6
e+CUy1q/rwuiH7O2yeIk47Cmwa2OiG0cXPVNk7X5jP09FkZDRuN7Qn2DsI2RM06S
CnjagSWFeo33goySCKOn+MAHEI39YGX6i0ZDJP8BF9uOCQ8/LxUc+byuFuYUho66
ZJ5tj4+juBN8LDWheGrLUhOLPvhMGgC+Ibk9wNHw2TSBny9BtLOFCgwjAwWdliTc
QoTfJf5b/oumyQTwFRYihKqItNdshFwmXsdmyEwlej1aoNdEzhS49kmswAIFROY2
3njXucvguHRlQ/JcF3IKN/TdnxWgqw82iRgN1TsMTYH5T4jEaeWPd7P7sqEdPgme
QO7SOKW/dpIhLdepbQPUjH0jNaSdcfCDwEU0dLZ2a88KqausLWposoaFrmt36gcz
0lOsgUhwa2dvIjEE9FXAAPIuMbnXDbrkAu9aM1sM2eM7NplA8JxxT+j7zdAH1ANu
PfKGXGCxLsbKPGrQbxqnbuwdUv8ODt7TG6KdhbygbgwJ8mh9xYiPNs1K7RTA3Jip
sZZzKNQ0l/G8w/kbv0lxsy359OE0XXk24tI6J0hh8cCqSRbapZEVCLHlEYst+Yrh
NnbOfAbwgt+BYD7hqa3+5DIjXyOonvCnTCV8JtN4KLolgXTQQuUJjkZG5PfVN6/t
-----END RSA PRIVATE KEY-----
7 changes: 7 additions & 0 deletions artifacts/testdata/files/keys/UnencryptedED25519KeyPair.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtz
c2gtZWQyNTUxOQAAACB0M7NQwWgHF3xirTctmn/yw9tpd3vRdRBK8Z9oIGTJ4gAA
AIhf0wxxX9MMcQAAAAtzc2gtZWQyNTUxOQAAACB0M7NQwWgHF3xirTctmn/yw9tp
d3vRdRBK8Z9oIGTJ4gAAAEAwUQIBATAFBgMrZXAEIgQgp08TdS3yr6NMV4lPZzPn
CXQzs1DBaAcXfGKtNy2af/LD22l3e9F1EErxn2ggZMniAAAAAAECAwQF
-----END OPENSSH PRIVATE KEY-----
27 changes: 27 additions & 0 deletions artifacts/testdata/files/keys/UnencryptedRSAKeyPair.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAxA8IYuhOq7MRmySJ2uUAoCUxLyBhTvoS5nxsnmW6DrPSSJEo
yxVQbGkMU4T0Pz7onGkCHiIF5yDdJXnl5MoCyExIa8Zk2w13ElMTdlKaKW33DOkm
Ht38kXfdMIO782DDElTkNk9nfqNnABvFzq1DZry1ubxkcrZHMBY757b9kVuQZeZw
QAgQn4LMbDGoYO2K76VRRetmsfx8upekG9We6uJXVEhE+O+aq3/xstWPnDBxsv0z
uBNUfL2F0tW4YuEaibMzENrbxBrYGfDOnIzmiDc13H2g1c9fy7l2cxK6bPtNC5Gl
8dugCi0RuAvJBmFri9IwhxzMuWKPLfRz/j+TJQIDAQABAoIBAQCv2DvRWkKVRTqZ
R6BNL+/rsu/2MLiWOT0SdK6HMv45iZcldux7mVZUpbNkhW77+tRu1NANbr6Umqk+
n6JOHdF5DNI3t+1leyI80T43dcbHOdXHQqXqMXgCkNtWVBETLMpJetJk07sjnjMX
qdE0mbpGPyNOv2XobQxUWNzJ6xpqb3yGKifuo3XyW6MROeB1Cl5fB6+G9rpwH+R+
HwSLYYhfD9naExRs1dNuFFinVzFRHtdKr6LE7vNhy/sko6b1vvsDiLpwsCcAM54o
uhfhkBaZC5zc8o0zKZsgole3/2GcMOD5yTyTFOpN5hsTNse4+Ho732+W5CZM1y5S
x+KRyoZRAoGBAP3KQkc/kHlekZX5phXKNflEg/apMYbiP4oJ8N5Ku8ij3oBTgpmg
cZ5BZtXaRTnhmEqI5mo+NJW+PenQTio2BoNepyqkCUQ+KfX1oPq76WFOGxDSFTKq
v7kPZvX2bNID7o6QxZf0n/kTZSQpEUwbIayVOzlN8W0TSIYcbPMt5XC/AoGBAMXE
FLUY4F/8l9rPTq3kWYQkzmbmWrcaleM/EcKeSuU0WzOfG0g4npjEcZzHgmmoMnud
PusdAl6T2tsfgXW1zverP5uJ0C6hZvyaSPYPDFLkoifBgQll92Q2gYlp48MvC3ee
B6idmm7ooie9EOnM9AVTH0laSaVc6PtZhS4pcBEbAoGBAINojPTzVs1hSCTNxU+X
CmdtMJ8xcDGVSK0jBJM1QxJat0Te+MqvJuV4m9SzVhDoXMCLLjNozjWS8d/1OePl
YW34Prp3gUzSm0t9ycLKNcdqd903yj4X53ndHcTRufrsikNLduR9h6+ieUZF9Wzg
x4jjJG1BjHab+3tlkIxCAYFlAoGANF1kAkOw/Zl7eAOWWLLzBOtd/58U/BC9CWvk
vvx85k3DrFp/tdLQI7E4SAQHwwQ3QcX0J/sJapOJyqV/+PQH9kpQ0FVgW0h/ZXlQ
wl5fq/8/9HjnOt7V76IDEKiKF194kNa2Pm5kuuM8NHt6Y/3RyyskSJ7wiymbwxoE
CqIMO2sCgYA27Eq7Oo/MY8gtvlQ6h8RtH6ZAoIKZHN5BIS5bAVi4A8U22scznb7d
s1/PEBpAhbYh7hHLMOadp35NCt59y1WEwX7TWZt49RbSUyN/ZYNi8xuP6I1xpHG9
6iWe96/0/wZDkb4ZCvTsBizfj6OIUWeCVV6t5IWfsPlZ2cetAUYjVw==
-----END RSA PRIVATE KEY-----
39 changes: 39 additions & 0 deletions artifacts/testdata/files/keys/encrypted.key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABAfO+geoe
bUcjzqb2zdIVySAAAAEAAAAAEAAAGXAAAAB3NzaC1yc2EAAAADAQABAAABgQDNMoPvsO10
3CXOefHjFzLigwWDyMHsL1PsCjfPyKXAnVd/Iq58UXcSKAF9AkrUzqM7EpKD38BCA1dU/F
GMmNZfIxhumsyZTbs47J7kJJKUopnuI+VOoRP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dixEXE9tExSTYKslqkOAK/DY
yb2etbqY8d02NNpXdZze5PpjdEZkQuCgqWhpeLr3EbUa+2vzbtgFCBXFDX/jZN/uNmSH4N
0ng+9/JFaK6NFrxM9S1MAmtje+Jy8aoLcOdjBAOMall9aIMRbLSFPSUOuzw8lij1LQGgMU
WR4DLg==
-----END OPENSSH PRIVATE KEY-----
42 changes: 42 additions & 0 deletions artifacts/testdata/files/keys/pkcs8_encryped.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIHbTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQIFgBG9p4RZXUCAggA
MAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAECBBAiPaHXxW6B3kG0A8KkGu5SBIIH
EGsXZHbM9Azy453wY1+s/K+6o527aFJqta25/8Wbkrmd3KRHV4vvspgiR0x4nJgS
EMl0GRgx04bJCUKWvYaACEijlcBWlMvmAJul0+p+foJjzBDMw4b1DbwT5jC5pD3s
mv2AYMrk6w8YnUAPRY82rTyFKPVkrQO8nYHTe4bE5sIh9lRgA+H85bsXwI6gQXL4
nRxYQaCUb4Mk5nJxg+m843xa/L666n28AmqB1HrntW8/9WzU5XVIWhkHIVlz5MN5
z7ENu6eGlr9SrJ0bOEzzvgigEqH0zmWckswLV55vAW/nWC0LVZl/CE+4zv/Dqxrq
PhjSHCgxZC5n0M+18LtKAr5w3DdKOeSty/53Zz6ZwUMZnXkJ3CaLbZ1tnqfYrrlV
cdnhVTKgitTClHl0W563f925ioZXx8lr3Cb3LdUjW3V25bs4lANslgsJWI/UgOVs
J8ReHKte+/x2YOyRzSrm0orR+s5oNGUotNd01o9flOq6N3z5YILqUpJL7ozrhqN/
PmDOu/ZCQshBS3WhuZm5+l8DWvky5Iv+KP4BCErDl45jyoUaMCTuaVwtHoViBDZD
el4TMnO2f1TOdJs3sJMwwQN4AvJ7PCQLIQ+SuEDsTSUslEl8w91c5VidQ/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uaSFyAs+NHz9IzwJCk89vPQeyysQdeoL
zddTZPiEUWx/qULD/dloZdow4aK1hKv4ibV0jdI1VkdEpM56YSB6LZ54rd1BZVYi
u9GxQ7gPAxcFb79MzD4jr7JsxlnGqxkxCXf7Q1cXCRQh3tr92SH+qa/0HA1PPWcG
VHLloxkS3Fl734db1MVONsCMRpZkoZPEBC3e8jF5oktW0QauhGIABti4AuXbtm61
mrDx2glNCQKAXL2W5hRp6XNb6NgUuxrrGQt8lidvbceT/e402TBvBNpUuHMl6atc
hl5v2notQKfIu+y08soUgV0hhxVraKW+bbaaA55rsiQpv9P05759jCHmU/YwJVA9
lWDiMnwEmXwFQ5tfVK0mag1EgmXpA7kd9gc7Lkx1RXdxsCeYNjn2lixagKzLCuO6
J+GxBh+ZQ/dM8z0L4eD4HLmLmdTI1KLBANRmq66Em5kiEbQ74EhYTgSU1Cg6pTUH
G7fWspvxqJVHz55vzM0XWBMRL6zvGpf056BH34AWZWROYDrUAEIpvL7rSW09/Oum
MU3EwlKrVu7Znd4KCqX27LyemIUubRS2hBSbKaHkdfBb9C1w9DARmqug/PQl23mB
MqaHVSopv1qIW698P0rh9wf5ZshyMdSx40MQBeqy3D+cO02ki3FZdCISJrtOwv+L
XFsa41qg21Emnqk+06hDXYjeDxRp7zLpZpO0p8FtnQ2W
-----END ENCRYPTED PRIVATE KEY-----
40 changes: 40 additions & 0 deletions artifacts/testdata/files/keys/pkcs8_unencryped.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-----BEGIN PRIVATE KEY-----
MIIG/QIBADANBgkqhkiG9w0BAQEFAASCBucwggbjAgEAAoIBgQDjft5BcTVUOXKX
9hAMEZsIWUKhvNWP2owXBt7KM+Xf5+eBVtP3VHi/kNno3//GK7hEcVwu9nhVAZ/t
GG7qYJSrulNTznqJRT2sQQ7bNYtHjt9zrsQ8Yut7UKFiaDHDCzzhN5PgmKcNBZ04
Fj/es4RJGI6l7G2fsKUeSPMX94QlTZXq0ExIQXNpnI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vUhBczPiEwjfhlChv5Td1Xsun0Ekt3RE
8g9l8/DbYtnu9I4DGY1qSsg=
-----END PRIVATE KEY-----
38 changes: 38 additions & 0 deletions artifacts/testdata/files/keys/unencrypted.key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEArhxVuODKCIYyTt/UPmIuwhg6ZCkp+cJXufYlqhYkRo4cI7wzFAnf
t5DXYK+56gYYTevZ0Vlh0MG18seOXh9i2WqM5EOcO8bzw88xc2buO04HnpMJNTIl+7pggw
iwqAtAxjbborVC8DdLFrzaK2v11Zx5e0QOCFjnzzKnmo3ZdJVuw1r5co2ayKHyIA8VgQkW
pxGkW7Ea8IFlUzGFCzGwEJEdwSO8KiXBeuwLPnIjJcs/gbRTQslTGLadGOrGb4K2d4a6WC
mwgwfY00R78jOsWtSTPqjZNggKMICSner0vIQPW8/tfucp0OdQyrpZ0a1HGt1p97Bc5RvL
AMoA13SrOu95niDOOM0zcLIjxvZ9eScygpmRcFjpuJqzIBPev2UIrC3AdlowknpFulfLUo
lcBabWvc//ZgG1H2BZh9Q+d6E7img2X05y52mAixUYMiujURm4w4dwH8y4eVWWfDTWulbC
Z88bgAn3B+jO2fRL4B+h5FSL9aq2YNgd3qk0p9g7AAAFgBB/4wcQf+MHAAAAB3NzaC1yc2
EAAAGBAK4cVbjgygiGMk7f1D5iLsIYOmQpKfnCV7n2JaoWJEaOHCO8MxQJ37eQ12CvueoG
GE3r2dFZYdDBtfLHjl4fYtlqjORDnDvG88PPMXNm7jtOB56TCTUyJfu6YIMIsKgLQMY226
K1QvA3Sxa82itr9dWceXtEDghY588yp5qN2XSVbsNa+XKNmsih8iAPFYEJFqcRpFuxGvCB
ZVMxhQsxsBCRHcEjvColwXrsCz5yIyXLP4G0U0LJUxi2nRjqxm+C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Gywm8oT2
JcuOLe7JiG9muPI2SDNOKu+YqQnch5AFlCU2OOBlN13oC2JB4XR7RYn/uJpY8aPwvey5Ea
1W28pNCt2LibmrEgh7SUrCUf7j3iveYBV8NPJoDhodbAXRtKFCPqI279qK3RhnxRBPQY8U
HIPZK2inqNhkIpaqsPIrV83aHeTe3DADOwK2/JWdl9gh8uGwLA30rZV60cpqaN4Zly8SET
7GrE+SWm6DSYaTC+KanWa0ZuYThGThAAAAwQDQ7qppyC2xr2pXGFT7usISgt1tiCu4Rokz
g5fXtv+mhf7bzsMJC/HaiD4W/dKUH2rK0qD/D4pxXoCJNnb0n7/j9R4GFpNapJ1iAM/bjP
p6er/Fs+7DPqLvLiM/OXZDRXabhpOFoN39FmrZaLFS8o263xR8rPPb/78H5jdXLPRIDgw7
x4ke7iSmcv3vJ+dXSze1WWjNotfMKMbn0Lkbd3sp8WXYwf+Yq3oc3aFw3D/XtW2sZ4E2cm
2Z5Hb8NDwTRJsAAAAKbWljQGRldmJveAE=
-----END OPENSSH PRIVATE KEY-----
4 changes: 4 additions & 0 deletions artifacts/testdata/server/testcases/ssh.in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Queries:
- SELECT basename(path=FullPath) AS Name, KeyType, Cipher, Header
FROM Artifact.Linux.Ssh.PrivateKeys(
KeyGlobs=srcDir+"/artifacts/testdata/files/**/*.pem")
Loading

0 comments on commit dc02b45

Please sign in to comment.