Unrestricted Oracle DB Access
ID: ec2-unrestricted-oracle
Severity: critical
Author: princechaddha
Tags: cloud,devops,aws,amazon,ec2,aws-cloud-config
Description
Section titled “Description”Identifies unrestricted inbound access to Oracle databases in Amazon EC2 instances, which increases the risk of unauthorized access and attacks.
YAML Source
Section titled “YAML Source”id: ec2-unrestricted-oracleinfo: name: Unrestricted Oracle DB Access author: princechaddha severity: critical description: | Identifies unrestricted inbound access to Oracle databases in Amazon EC2 instances, which increases the risk of unauthorized access and attacks. impact: | Allows potential unauthorized access to the Oracle database, leading to data leakage, data manipulation, or further exploitation. remediation: | Restrict inbound traffic on TCP port 1521 to known IPs or ranges and employ strict access controls. reference: - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-rules-reference.html tags: cloud,devops,aws,amazon,ec2,aws-cloud-config
variables: region: "us-east-1"
self-contained: truecode: - engine: - sh - bash source: | aws ec2 describe-security-groups --region $region --filters Name=ip-permission.from-port,Values=1521 Name=ip-permission.to-port,Values=1521 Name=ip-permission.cidr,Values='0.0.0.0/0' --query 'SecurityGroups[*].GroupId' --output json
extractors: - type: json name: securitygroup internal: true json: - '.[]'
- type: dsl dsl: - 'securitygroup + " security group(s) alows unrestricted access (0.0.0.0/0 or ::/0) on TCP port 1521"'# digest: 4b0a00483046022100ece90528d2a01b89f8b9e456f29d546cc38f803ac1cdbf2dfecf2115fe30ea9f0221008c11f50da4ca6e2852bbae8f47db243348aec84e1566e3df378e633c5e2f40d9:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "cloud/aws/ec2/ec2-unrestricted-oracle.yaml"