
we are providing DevOps and security teams script to identify cloud workloads that may be vulnerable to the Log4j vulnerability(CVE-2021-44228) in their AWS account. The script enables security teams to identify external-facing AWS assets by running the exploit on them, and thus be able to map them and quickly patch them
.. image:: images/Mitiga_logo.png
we are providing DevOps and security teams script to identify cloud workloads that may be vulnerable to the Log4j vulnerability(log4shell) in their AWS account. We currently support "CVE-2021-44228" and "CVE-2021-45046" RCE vulnerabilities. The script enables security teams to identify external-facing AWS assets by running the exploit on them, and thus be able to map them and quickly patch them
Features ########
<https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html>_cPython 3.6 and higher
install the required Python packages: .. code-block:: console
pip3 install -r requirements.txt
AWS permissions to scans the resources: .. code-block:: json
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:DescribeInstances", "ec2:DescribeSecurityGroups", "elasticloadbalancing:DescribeLoadBalancers", "elasticloadbalancing:DescribeListeners", "elasticloadbalancing:DescribeRules", "elasticloadbalancing:DescribeTargetGroupAttributes", "elasticloadbalancing:DescribeTargetGroups", ], "Resource": "*" } ] }
Before Execution The Script
########
You need a server which will wait for DNS requests from the vulnerable endpoints,
For this demo we are using: interactsh <https://github.com/projectdiscovery/interactsh>, which is an external tool You can use interactsh client or Interactsh web app <https://app.interactsh.com/#/>
Get the URL address for the DNS requests. Using 'interactsh' you can find it in the client app here: .. image:: images/interactshdomain.png or using the web app: .. image:: images/webinteractsh.png
Execute the main.py script with argument:
Finding Vulnerable Endpoints ######## the vulnerable endpoints should send DNS requests to your server with the format:
cli example:
.. image:: images/interactshresult.png
web example:
.. image:: images/webinteractsh_result.png
This project should be used only for educational purposes. The project does not replace a mature remediation plan and does not provide full coverage on external-facing or vulnerable assets. Mitiga does not hold responsibility for any damage caused by using this project.