Home

Awesome

ChatGPT4Security

All Scripts and .yaml files are created with ChatGPT

Sample Security Lab Ansible Playbook

This playbook installs and configures the ELK stack, Kali Linux, DVWA, mod_security, and forwards DVWA logs to the ELK stack using Filebeat. It also starts the Elasticsearch, Kibana, Logstash, and Filebeat services and enables them to start automatically on boot. You will need to modify the code to fit your specific needs and environment. For example, you may need to adjust the Elasticsearch, Kibana, and Logstash versions, and you will need to provide the templates for the Elasticsearch, Kibana, Logstash, mod_security, and Filebeat configuration files. You may also need to change the Apache log file path if it is different on your system.

Horizantal auto scaling kubernetes cluster for elk stack

This manifest creates a service for Elasticsearch, a horizontal pod autoscaler for Elasticsearch, a stateful set of 3 Elasticsearch replicas, a persistent volume claim for the Elasticsearch data, a service for Kibana, a horizontal pod autoscaler for Kibana, a deployment of 3 Kibana replicas, a service for Logstash, a horizontal pod autoscaler for Logstash, and a deployment of 3 Logstash replicas. It also configures the Elasticsearch environment variables and the Logstash input and output settings.

You will need to modify the code to fit your specific needs and environment. For example, you may need to adjust the Elasticsearch, Kibana, and Logstash versions,

Advanced XSS Scanner

This script will crawl the website, following links and forms, and perform a variety of tests using different payloads to look for XSS vulnerabilities. It will then print the vulnerabilities that it finds, including the URL, parameter, and payload that was used to exploit the vulnerability.

You can customize and expand this script to meet your specific needs and requirements. For example, you can add more payloads and tests, handle different types of responses and HTTP methods, generate reports, and integrate the scanner into your existing workflow.

Python SAST and Defectdojo

ChatGPT Input : write python script that scan a sample gitlab project with sast sca scanner and outputs results to defect dojo

This script will clone the sample GitLab project, scan it with a specified SAST SCA scanner, parse the output, and create a product, engagement, test, and finding in DefectDojo. It will then print the finding that was created in DefectDojo.

You can customize and expand this script to meet your specific needs and requirements. For example, you can add more scanners, options, and output formats, handle different types of responses and errors, generate reports, and integrate the scanner into your existing workflow.

SigmaRule for Ransomeware

ChatGPT Input : write sigma rule to find ransomeware samples

This rule uses the file_name and process_name fields to match specific strings that are commonly associated with ransomeware samples. If a match is found, the rule triggers an alert and includes information about the process and file names, paths, and user details in the alert. The rule also tags the alert with the attack.ransomware tag for easy identification and filtering.

You can customize and expand this rule to meet your specific needs and requirements. For example, you can add more strings and patterns, use different fields and operators, set different thresholds and conditions, and add more tags and outputs. You can also use this rule as a starting point and build more advanced and sophisticated rules that can detect ransomeware samples and other threats based on different indicators and behaviors.

Gitlab Secret Finder

This script uses the gitlab library to authenticate to the GitLab API, and to access and search the repository's files and content. The script uses the re library to match the secret pattern in the file content, and then prints the secret file path and content to the console.

You can customize and expand this script to meet your specific needs and requirements. For example, you can set different access tokens, URLs, patterns, repository names, branch names, and output formats. You can also use this script as a starting point and build more advanced and sophisticated secrets scanners that can scan and search different types of secrets in different GitLab repositories and branches.

SSL Handshake sample pcap generator

In this script, the scapy library is used to create and write the SSL handshake traffic between the client and the server to a PCAP file. The client and server IP addresses and ports are defined, and the SSL handshake messages and payloads are created using the scapy packet classes. The SSL handshake traffic is then created by concatenating the different SSL handshake messages and payloads, and the traffic is written to a PCAP file using the wrpcap method from scapy. The script generates the SSL handshake traffic in real-time, and the traffic data is stored in the PCAP file in a binary format that can be read and analyzed using a network sniffer or analyzer tool. The script can be customized and extended to include different SSL protocols, ciphers, and options, and to generate different types of SSL traffic patterns and scenarios. The PCAP file can be used as a sample data source for testing and training network security tools and models