zBang is a risk assessment tool that detects potential privileged account threats
zBang is a risk assessment tool that detects potential privileged account threats
zBang is a special risk assessment tool that detects potential privileged account threats in the scanned network.
Organizations and red teamers can utilize zBang to identify potential attack vectors and improve the security posture of the network. The results can be analyzed with the graphic interface or by reviewing the raw output files.
More details on zBang could be found in the Big zBang Theory blog post by @Hechtov:
https://www.cyberark.com/threat-research-blog/the-big-zbang-theory-a-new-open-source-tool/
The tool is built from five different scanning modules:
For your convenience, there is also a summarized Data Sheet about zBang:
https://github.com/cyberark/zBang/blob/master/zBang%20Summarized%20Data%20Sheet.pdf
Download and run the release version from this GitHub repository link or compile it with your favorite compiler.
In the opening screen, choose what scans you wish to execute.
In the following example, all five scans are chosen:
To view demo results, click “Reload.”
zBang tool comes with built-in initiating demo data; you can view the results of the different scans and play with the graphic interface.
To initiate new scans in your network, click “Launch.” A new window will pop up and will display the status of the different scans.
When the scans are completed, there will be a message saying the results were exported to an external zip file.
The results zip file will be in the same folder of zBang and will have a unique name with the time and the date of the scans. You can also import previous results into the zBang GUI without the need of rerunning the scans.
To import previous results, click “Import” in the zBang’s opening screen.
Choose the domain you have scanned.
You will see a list of the most privileged accounts that were discovered.
On the left side - view “standard” privileged accounts that get their privileges due to their group membership.
On the right side - view “Shadow Admins.” Those accounts get their privileges through direct ACL permissions assignment. Those accounts might be stealthier than standard “domain admin” users, and therefore, they might not be as secure as they should be. Attackers often target and try to compromise such accounts.
On each account, you can double click and review its permissions graph. It may help you understand why this account was classified as privileged.
The different abusable ACL permissions are described in a small help page. Click the “question mark” in the upper right corner to view:
More details on the threat of Shadow Admins are available in the blog post -
“Shadow Admins – The Stealthy Accounts That You Should Fear The Most”:
https://www.cyberark.com/threat-research-blog/shadow-admins-stealthy-accounts-fear/
For manual examination of the scan results, unzip the saved zBang results file and check the results folder: "[Path of the zBang’s unzipped results file]\ACLight-master\Results”, contains a summary report - “Privileged Accounts - Layers Analysis.txt”.
On each of the discovered privileged accounts:
The goal is to make all the accounts marked as “secured” with the green color.
In the scan page (click the relevant bookmark in the above section), there will be a list of all the scanned DCs.
Make sure all of them are clean and marked with green.
If the scan finds a potential infected DC, it is crucial to initiate an investigation process.
More details on Skeleton Key malware are available in the blog post “Active Directory Domain Controller Skeleton Key Malware & Mimikatz” by @PyroTek3: https://adsecurity.org/?p=1255
* For a visualization convenience, if a large number of accounts with non-privileged SID history are present (more than ten), they will be filtered out from the display, as those accounts are less sensitive.
In the scan results page, there will be a list of all the SPNs that registered with user accounts.
If the user account is a privileged account, it will be in red.
It is very risky to have SPNs that are registered under privileged accounts. Try and change/disable those SPNs. Use machine accounts for SPNs or reduce unnecessary permissions from the users who have SPNs registered to them. It’s also recommended to assign strong passwords to those users, and implement automatic rotation of each password.
For manual examination of the scan results, unzip the saved zBang results file and check csv file:
“[Path of the zBang’s unzipped results file]\RiskySPN-master\Results\RiskySPNs-test.csv".
More details on Risky SPNs are available in the blog post
“Service Accounts – Weakest Link in the Chain”:
https://www.cyberark.com/blog/service-accounts-weakest-link-chain/
The scan result page includes a list of all the discovered accounts trusted with delegation permissions.
There are three delegation types: Unconstrained, Constrained and Constrained with Protocol Transition. The account color corresponds to its delegation permission type.
Disable old and unused accounts trusted with delegation rights. In particular, check the risky delegation types of “Unconstrained” and “Constrained with Protocol Transition.” Convert “Unconstrained” delegation to “Constrained” delegation so it will be permitted only for specific needed services. “Protocol Transition” type of delegation must be revalidated and disabled, if possible.
For manual examination of the scan results, unzip the saved zBang results file and check csv file: “[Path of the zBang’s unzipped results file]\Mystique-master\Results\delegation_info.csv".
More details on risky delegation configuration are available in the blog post - “Weakness Within: Kerberos Delegation”: https://www.cyberark.com/threat-research-blog/weakness-within-kerberos-delegation/
zBang runs quickly and doesn’t need any special privileges over the network. As the only communication required is to the domain controller through legitimate read-only LDAP queries, a typical execution time of zBang on a network with around 1,000 user accounts will be seven minutes.
When you intend to scan large networks with multiple trust-connected domains, it’s recommended to check the domain trusts configuration or run zBang separately from within each domain to avoid possible permission and connectivity issues.
zBang version 1.2.1:
SHA-256 ce747740a9a24c330c18c2f09f6ee344e1806666abf21c8c2f964fa61f438903
zBang was developed by CyberArk Labs as a quick and dirty POC intended to help security teams worldwide. Feedback and comments are welcome.
Main points of contact:
Asaf Hecht (@Hechtov), Nimrod Stoler (@n1mr0d5) and Lavi Lazarovitz (@__Curi05ity__)
No open issues yet, or sync has not completed.