CandyShell Security
The mess it makes
• Aaron Bishop
• CISSP
•
• Sys Admin - 2 years
• Developer - 2 years
• Pen Tester - 2 years
• Michael Monsivais
• CISSP
•
• Sys Admin - 2 years
• Pen Tester - 4 years
Purpose
Purpose
• Candy Security - “A term coined by Bellovin and Cheswick of Bell
Labs to describe a security scenario where the outer perimeter,
such as firewall, is strong, but the infrastructure behind it is weak.
The term refers to M&M candy, which has a hard outer shell and
soft center. ” - Kevin Mitnick, The Art of Deception pg.77
Purpose
• Candy Security - “A term coined by Bellovin and Cheswick of Bell
Labs to describe a security scenario where the outer perimeter,
such as firewall, is strong, but the infrastructure behind it is weak.
The term refers to M&M candy, which has a hard outer shell and
soft center. ” - Kevin Mitnick, The Art of Deception pg.77
• Examine the “gooey” center of an example infrastructure
Purpose
• Candy Security - “A term coined by Bellovin and Cheswick of Bell
Labs to describe a security scenario where the outer perimeter,
such as firewall, is strong, but the infrastructure behind it is weak.
The term refers to M&M candy, which has a hard outer shell and
soft center. ” - Kevin Mitnick, The Art of Deception pg.77
• Examine the “gooey” center of an example infrastructure
• Provide Sys Admins an attackers point of view
Purpose
• Candy Security - “A term coined by Bellovin and Cheswick of Bell
Labs to describe a security scenario where the outer perimeter,
such as firewall, is strong, but the infrastructure behind it is weak.
The term refers to M&M candy, which has a hard outer shell and
soft center. ” - Kevin Mitnick, The Art of Deception pg.77
• Examine the “gooey” center of an example infrastructure
• Provide Sys Admins an attackers point of view
• Increase emphasis on security
Common Problems
• Services running as privileged user
• Services pointed to home directories
• Data not segregated by role
• Incorrect file permissions
• Incorrect script/executable permissions
• Root login enabled
• Password-less SSH keys
• Password-less Sudo
• Privileged accounts logged in
• Password reuse
• Passwords stored in files
• Public git repositories
• Mystery services
• Mystery servers
• Magic
• Multipurpose servers
• One off solutions/ quick fixes (No change control)
• Lack of Documentation
• Lack of/Ignored Logging & Monitoring
• Lack of/Misconfigured IDS/IPS
Common Problems
• Services running as privileged user
• Services pointed to home directories
• Data not segregated by role
• Incorrect file permissions
• Incorrect script/executable permissions
• Root login enabled
• Password-less SSH keys
• Password-less Sudo
• Privileged accounts logged in
• Password reuse
• Passwords stored in files
• Public git repositories
• Mystery services
• Mystery servers
• Magic
• Multipurpose servers
• One off solutions/ quick fixes (No change control)
• Lack of Documentation
• Lack of/Ignored Logging & Monitoring
• Lack of/Misconfigured IDS/IPS
The Target
The Target
DMZ
Emp VLAN Admin VLANAdmin VLAN
The “Attack”
DMZ
Emp VLAN
FSLog Wiki TM APPLEWeb
The “Attack”
DMZ
Emp VLAN
Log
The “Attack”
FSWiki TM APPLEWeb
Log
The “Attack”
• IPMI service
FSWiki TM APPLEWeb
Log
The “Attack”
• IPMI service
• Root was logged in
FSWiki TM APPLEWeb
Log
The “Attack”
• IPMI service
• Root was logged in
• SSH Session Hijacking
FSWiki TM APPLEWeb
Log
The “Attack”
• IPMI service
• Root was logged in
• SSH Session Hijacking
FSWiki TM APPLEWeb
The “Attack”
Log FSWiki TM APPLEWeb
The “Attack”
• Open Account Creation
Log FSWiki TM APPLEWeb
The “Attack”
• Open Account Creation
• No ACL’s
Log FSWiki TM APPLEWeb
The “Attack”
• Open Account Creation
• No ACL’s
• Server Documentation available
Log TM APPLEWebWiki FS
Wiki
The “Attack”
Log TM APPLEWebFS
Wiki
The “Attack”
• Share mounted by web server
Log TM APPLEWebFS
WebWiki
The “Attack”
• Share mounted by web server
• Uploaded a PHP shell to Fileserver
Log TM APPLEFS
The “Attack”
WebWikiLog TM APPLEFS
The “Attack”
• Apache password Hashes
WebWikiLog TM APPLEFS
The “Attack”
• Apache password Hashes
• SQL Dump Ticketing System
WebWikiLog TM APPLEFS
The “Attack”
• Apache password Hashes
• SQL Dump Ticketing System
WebWikiLog FS TM APPLE
APPLETM
The “Attack”
WebWikiLog FS
APPLETM
The “Attack”
• Incorrect Permissions
WebWikiLog FS
APPLETM
The “Attack”
• Incorrect Permissions
• Unprotected SSH Keys
WebWikiLog FS
APPLETM
The “Attack”
• Incorrect Permissions
• Unprotected SSH Keys DMZ
WebWikiLog FS
APPLETM
The “Attack”
• Incorrect Permissions
• Unprotected SSH Keys
• Password-less sudo
DMZ
WebWikiLog FS
APPLETM
The “Attack”
• Incorrect Permissions
• Unprotected SSH Keys
• Password-less sudo
DMZ
WebWikiLog FS
APPLETM
The “Attack”
• Incorrect Permissions
• Unprotected SSH Keys
• Password-less sudo
DMZ
WebWikiLog FS
The “Attack”
APPLETMWebWikiLog FS
The “Attack”
• Download 802.1x config
APPLETMWebWikiLog FS
The “Attack”
• Download 802.1x config
Admin VLAN
APPLETMWebWikiLog FS
The “Attack”
• Download 802.1x config
Admin VLAN
APPLETMWebWikiLog FS
Admin VLAN
The “Attack”
DMZ
Emp VLAN
Admin VLAN
The “Attack”
DMZ
Emp VLAN Admin VLAN
The “Attack”
Admin VLAN
PM
The “Attack”
SSHSSH
Admin VLAN
SSH
PM
The “Attack”
SSHSSH SSH
PM
The “Attack”
SSHSSH SSH
• Username and Password Reuse
PM
The “Attack”
SSHSSH SSH
• Username and Password Reuse
• Active Session
PM
The “Attack”
SSHSSH SSH
• Username and Password Reuse
• Active Session
• Unprotected SSH key
Admin VLAN
PM
The “Attack”
SSHSSH SSH
• Username and Password Reuse
• Active Session
• Unprotected SSH key
• Root SSH
PM
The “Attack”
SSHSSH SSH
• Username and Password Reuse
• Active Session
• Unprotected SSH key
• Root SSH
Admin VLAN
The “Attack”
DMZ
Emp VLAN Admin VLAN
Admin VLAN
The “Attack”
DMZ
Emp VLAN Admin VLAN
VOIP
Development
Datacenter
Self assessment
• What would change? What did change?
• Who should have access (rwx)? What is the lowest
privilege that could access (rwx)?
• Is it the easy answer or the right answer (is it kindling
for a future fire)?
• Has it been documented and tested?
• Has it been peer reviewed? Is it sane?
The “Solution”
SSHSSH SSHPM
• Username and Password Reuse
• Active Session
• Unprotected SSH key
• Root SSH
The “Solution”
SSHSSH SSHPM
• Username and Password Reuse
• Active Session
• Unprotected SSH key
• Root SSH
The “Solution”
SSHSSH SSHPM
• Username and Password Reuse
• Active Session
• Unprotected SSH key
• Root SSH
The “Solution”
• Download 802.1x config
Admin VLAN
APPLETMWebWikiLog FS APPLE
The “Solution”
• Download 802.1x config
Admin VLAN
APPLETMWebWikiLog FS APPLE
The “Solution”
• Download 802.1x config
Admin VLAN
TMWebWikiLog FS APPLE
Admin VLAN
The “Solution”
DMZ
Emp VLAN Admin VLAN
VOIP
Development
Datacenter
Admin VLAN
The “Solution”
DMZ
Emp VLAN Admin VLAN
VOIP
Development
Datacenter
The “Solution”
• Incorrect Permissions
• Unprotected SSH Keys
• Password-less sudo DMZ
APPLETMWebWikiLog FS
The “Solution”
• Incorrect Permissions
• Unprotected SSH Keys
• Password-less sudo DMZ
APPLETMWebWikiLog FS
The “Solution”
• Incorrect Permissions
• Unprotected SSH Keys
• Password-less sudo DMZ
APPLETMWebWikiLog FS
The “Solution”
• Incorrect Permissions
• Unprotected SSH Keys
• Password-less sudo DMZ
APPLETMWebWikiLog FS
Admin VLAN
The “Solution”
DMZ
Emp VLAN Admin VLAN
VOIP
Development
Datacenter
Admin VLAN
The “Solution”
DMZ
Emp VLAN Admin VLAN
VOIP
Development
Datacenter
The “Solution”
• Apache password Hashes
• SQL Dump Ticketing System
APPLETMWebWikiLog FS
The “Solution”
• Apache password Hashes
• SQL Dump Ticketing System
APPLETMWebWikiLog FS
The “Solution”
• Apache password Hashes
• SQL Dump Ticketing System
APPLETMWebWikiLog FS
The “Solution”
• Share mounted by web server
• Uploaded a PHP shell to Fileserver
APPLETMWebWikiLog FS
The “Solution”
• Share mounted by web server
• Uploaded a PHP shell to Fileserver
APPLETMWebWikiLog FS
The “Solution”
• Share mounted by web server
• Uploaded a PHP shell to Fileserver
APPLETMWebWikiLog FS
The “Solution”
• Open Account Creation
• No ACL’s
• Server Documentation available
APPLETMWebWikiLog FSWiki
The “Solution”
• Open Account Creation
• No ACL’s
• Server Documentation available
APPLETMWebWikiLog FSWiki
The “Solution”
• Open Account Creation
• No ACL’s
• Server Documentation available
APPLETMWebLog FSWiki
The “Solution”
• IPMI service
• Root was logged in
• SSH Session Hijacking
APPLETMWebWikiLog FSWikiLog
The “Solution”
• IPMI service
• Root was logged in
• SSH Session Hijacking
APPLETMWebWikiLog FSWikiLog
The “Solution”
• IPMI service
• Root was logged in
• SSH Session Hijacking
APPLETMWebFSWikiLog
The “Solution”
DMZ
Emp VLAN Admin VLANAdmin VLAN
The “Solution”
DMZ
Emp VLAN Admin VLANAdmin VLAN
aaron@securitymetrics.com
mike@securitymetrics.com

presentation