Skip to content

Instantly share code, notes, and snippets.

View smhuda's full-sized avatar
🖥️
hack the stack!

Syed M. Huda smhuda

🖥️
hack the stack!
View GitHub Profile
@smhuda
smhuda / clickjacking-checker.html
Created February 18, 2021 20:00
Clickjacking POC Checker
<!--Clickjacking iFrame HTML Template -->
</html>
<head>
<title>Clickjacking iFrame Test Page</title>
</head>
<body style="background-color:lightgray">
<h1><b><font face="verdana">Website is vulnerable to clickjacking!</font></b></h1>
@smhuda
smhuda / bulk-whois.sh
Created February 18, 2021 20:01
Bulk WHOIS
for domain in `cat domains.txt`
do
echo $domain
`whois $domain >> whois-results.txt`
done
@smhuda
smhuda / smb-signing-check.sh
Created February 18, 2021 20:02
SMB Signing Checker
#!/bin/bash
# check-smb-signing.sh (v2.0)
# v1.1 - 10/26/2017 by Ted R (http://github.com/actuated)
# v2.0 - 10/30/2017
# Script to run and parse SMB message signing results using Nmap's smb-security-mode.nse or RunFinger.py
# 11/01/2017 - Test of different options and conditions
# 11/03/2017 - Added support for RunFinger.py stdout input file parsing
varDateCreated="10/30/2017"
varDateLastMod="11/03/2017"
@smhuda
smhuda / fqdn2ip.cmd
Created February 18, 2021 20:04
FQDN To IP Address
@del Results.txt
@for /f %%I in (Hostnames.txt) do ping -n 1 %%I >> Results.txt
@find “Pinging” Results.txt > Output.txt
@del Results.txt
@for /f “eol=- tokens=2,3 delims= ” %%I in (Output.txt) do echo %%J >> Results.txt
@del Output.txt
@smhuda
smhuda / nessus-parser.pl
Created February 18, 2021 20:06
Nessus Findings Parser
#!/opt/local/bin/perl
use strict;
use XML::TreePP;
use Data::Dumper;
use Math::Round;
use Excel::Writer::XLSX;
use Data::Table;
use Excel::Writer::XLSX::Chart;
use Getopt::Std;
#use Devel::Size qw(size total_size); ############# New module
@smhuda
smhuda / build-review-audit.ps1
Created February 18, 2021 20:07
Build Review Security Audit
#RECORDING TRANSCRIPT TO DUMP FILE
$CurrentDir = $PSScriptRoot
$ServerName = $env:computername
$DumpFilePath = "$CurrentDir\\"+$ServerName+"-CONFIG_DUMP_$(get-date -Format yyyymmdd_hhmmtt).txt"
Start-Transcript -Path $DumpFilePath -NoClobber
Write-Host
Write-Host 'Checking if your PowerShell Script Execution Policy is set to Unrestricted' -ForegroundColor Yellow -BackgroundColor Black
Start-Sleep -s 5
@smhuda
smhuda / nessus-merger.py
Created February 18, 2021 20:08
Nessus Findings DB File Merger
# file: merger.py
# based off: <http://cmikavac.net/2011/07/09/merging-multiple-nessus-scans-python-script/>
# by: mastahyeti
import xml.etree.ElementTree as etree
import shutil
import os
first = 1
for fileName in os.listdir("."):
@smhuda
smhuda / nmap2csv.py
Created February 18, 2021 20:09
Nmap to CSV Parser
#!/usr/bin/env python
"""
Nmap2CSV is a simple Python script to convert XML (-oX) Nmap or Masscan
output files to a single CSV spreadsheet which summarizes all hosts and open
ports in a table in IP,PORT1,PORT2,PORT3,...,PORTN format: The first row is
the header with all open ports found on the scanned hosts. In the following
rows the specified character (default X) marks if the given port was found
open on the given host. The script also generates per-target results which
includes version information, if it is available.
@smhuda
smhuda / mobsf-pullnrun.sh
Created December 14, 2022 12:52
Pulls a MobSF docker image and then runs its (non-persistent)
#!/usr/bin/env bash
sudo bash -c 'docker pull opensecurity/mobile-security-framework-mobsf';
sudo bash -c 'docker run -it --rm -p 8000:8000 opensecurity/mobile-security-framework-mobsf:latest'
@smhuda
smhuda / mount-shared-folders.sh
Created December 16, 2022 22:40
Mount Shared Folders VMWare
#!/bin/bash
vmware-hgfsclient | while read folder; do
echo "[i] Mounting ${folder} (/mnt/hgfs/${folder})"
mkdir -p "/mnt/hgfs/${folder}"
umount -f "/mnt/hgfs/${folder}" 2>/dev/null
vmhgfs-fuse -o allow_other -o auto_unmount ".host:/${folder}" "/mnt/hgfs/${folder}"
done
sleep 2s