This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| /** | |
| * NodeShield Attack Simulation Suite | |
| * | |
| * Simulates common supply chain attack patterns to validate CBOM enforcement. | |
| * ⚠️ EDUCATIONAL ONLY - Do not use against systems you don't own. | |
| * | |
| * Based on NodeShield research dataset (arXiv 2508.13750) | |
| * Attack vectors tested: credential theft, RCE, data exfiltration, cryptomining | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # NodeShield Docker Deployment Stack | |
| # Complete setup for homelab CBOM enforcement testing | |
| # Tested on: Ubuntu 24.04, Docker 24.0.7, NodeShield 1.2.0 | |
| set -euo pipefail | |
| # Configuration | |
| API_DIR="./my-api" | |
| NODESHIELD_VERSION="1.2.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # DoH Provider Selection Based on Geographic Location | |
| def select_doh_provider(client_ip): | |
| """Select optimal DoH provider based on location""" | |
| # Simplified geo-detection | |
| if client_ip.startswith('192.168.'): | |
| return "https://local-doh.home.arpa/dns-query" | |
| elif is_asian_ip(client_ip): | |
| return "https://dns.google/dns-query" # Better in Asia |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # DoH Troubleshooting - Common fixes | |
| # 1. Slow Initial Queries | |
| # Implement DNS caching | |
| # For dnsmasq | |
| echo "cache-size=10000" >> /etc/dnsmasq.conf | |
| echo "min-cache-ttl=3600" >> /etc/dnsmasq.conf | |
| # For systemd-resolved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # DoH Certificate Pinning for Self-Hosted Servers | |
| import ssl | |
| import hashlib | |
| import base64 | |
| class SecureDoHClient: | |
| # ... (additional implementation details) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # DoH Performance Monitoring Tools | |
| import time | |
| import dns.resolver | |
| import requests | |
| from statistics import mean, stdev | |
| # Test using curl | |
| # curl -H 'content-type: application/dns-message' \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # DoH Router Setup - Multiple platform configurations | |
| # Linux (cloudflared) setup | |
| # Install cloudflared | |
| wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb | |
| sudo dpkg -i cloudflared-linux-amd64.deb | |
| # Configure as DNS proxy | |
| # ... (additional implementation details) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # IoT Security Lab Setup Script | |
| # Combines tools installation, IoTGoat deployment, and firmware analysis toolkit | |
| # Core analysis tools installation | |
| echo "[*] Installing core IoT analysis tools..." | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| wireshark \ | |
| nmap \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| IoT Network Monitor | |
| Real-time packet monitoring and anomaly detection for IoT devices using scapy | |
| """ | |
| from scapy.all import * | |
| import json | |
| from datetime import datetime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| IoT Vulnerability Testing Toolkit | |
| Combines default credential testing, MQTT discovery, and command injection tests | |
| for OWASP IoTGoat security assessment | |
| """ | |
| import telnetlib | |
| import time | |
| import paho.mqtt.client as mqtt |