Skip to content

Instantly share code, notes, and snippets.

View aw-junaid's full-sized avatar
🐞
finding bugs.

Abdul Wahab Junaid aw-junaid

🐞
finding bugs.
View GitHub Profile
@aw-junaid
aw-junaid / files.md
Created January 30, 2026 17:28
Essential Linux file commands for comparing, deleting securely, timestamps, disks/mounts, checksums, searching text/files, archiving/compressing, splitting/carving with dd, conversions, attributes, and useful misc ops like disabling history, compiling, rebooting, and URL extraction.

File & Misc Commands Cheat Sheet (Compare, Search, Archive, Hash, Convert)

Essential Linux file commands for comparing, deleting securely, timestamps, disks/mounts, checksums, searching text/files, archiving/compressing, splitting/carving with dd, conversions, attributes, and useful misc ops like disabling history, compiling, rebooting, and URL extraction.


Compare / diff

diff file file2

@aw-junaid
aw-junaid / Controller.md
Created January 30, 2026 17:36
Commands to clear or disable Bash history, stop logging to history files, truncate auth logs, terminate the current shell, and redirect history output to /dev/null. Includes corrected syntax and a few related essentials for controlling traces and sessions.

Controller Commands: History, Logs, and Session Control

Commands to clear or disable Bash history, stop logging to history files, truncate auth logs, terminate the current shell, and redirect history output to /dev/null. Includes corrected syntax and a few related essentials for controlling traces and sessions.


Log file control

  • : > /var/log/auth.log
@aw-junaid
aw-junaid / FileSystem.md
Created January 30, 2026 17:39
Overview of the Linux filesystem hierarchy with what each top-level directory is used for, plus a focused list of important configuration, user, network, SSH, logs, and service files (passwd/shadow, hosts, resolv.conf, fstab, cron, Apache logs, etc.).

Linux File System Structure & Key Files (Quick Reference)

Overview of the Linux filesystem hierarchy with what each top-level directory is used for, plus a focused list of important configuration, user, network, SSH, logs, and service files (passwd/shadow, hosts, resolv.conf, fstab, cron, Apache logs, etc.).


File system structure (directories)

Path Explanation
@aw-junaid
aw-junaid / PowerShell.md
Created January 30, 2026 17:42
Install and run PowerShell (`pwsh`) on Debian/Ubuntu, create remote PowerShell sessions (WinRM) with credentials, create Windows junction links, and common admin scripting patterns. Includes corrected ping sweep and DNS scripts with working syntax.

PowerShell Usage on Linux + Handy Scripts (Clean Reference)

Install and run PowerShell (pwsh) on Debian/Ubuntu, create remote PowerShell sessions (WinRM) with credentials, create Windows junction links, and common admin scripting patterns. Includes corrected ping sweep and DNS scripts with working syntax.


Installation (Debian/Ubuntu)

  • sudo apt install gss-ntlmssp
@aw-junaid
aw-junaid / iptables.md
Created January 30, 2026 17:46
Practical iptables basics: save/restore rules, list/flush, set default policies, allow established connections, remove rules by line, raw table viewing, restrict inbound to specific subnets/ports with logging, and NAT port-forward examples. Includes IPv6 equivalents (ip6tables).

iptables / ip6tables Commands Cheat Sheet (Rules, Policies, Logging, Forwarding)

Practical iptables basics: save/restore rules, list/flush, set default policies, allow established connections, remove rules by line, raw table viewing, restrict inbound to specific subnets/ports with logging, and NAT port-forward examples. Includes IPv6 equivalents (ip6tables).


Use iptables for IPv6

  • IPv6 firewall uses ip6tables (legacy)
@aw-junaid
aw-junaid / tcpdump.md
Created January 30, 2026 17:50
Common tcpdump examples to capture on an interface, save to PCAP, print payload in hex/ASCII, filter by host/port/subnet, view timestamps, capture ICMP ping replies, and limit captures by packet count (DNS example).

tcpdump Commands (Capture, Filter, Decode, Save)

Common tcpdump examples to capture on an interface, save to PCAP, print payload in hex/ASCII, filter by host/port/subnet, view timestamps, capture ICMP ping replies, and limit captures by packet count (DNS example).


Record packets on eth0, show ASCII + hex, and save to file

tcpdump -i eth0 -XX -w out.pcap

@aw-junaid
aw-junaid / WinCommands.md
Created January 30, 2026 17:54
Windows CMD commands for system/version info, services, processes, registry queries, domain/net enumeration, remote administration, networking (ipconfig/netstat/netsh), file/search utilities, event logs, firewall toggles, portproxy, PsExec, enabling RDP, and scheduling tasks.

Windows CMD System Info & Admin Command Cheat Sheet

Windows CMD commands for system/version info, services, processes, registry queries, domain/net enumeration, remote administration, networking (ipconfig/netstat/netsh), file/search utilities, event logs, firewall toggles, portproxy, PsExec, enabling RDP, and scheduling tasks.


Windows system information commands

  • ver
@aw-junaid
aw-junaid / PowerShell.md
Created January 30, 2026 17:59
PowerShell quick reference for help/discovery, services/processes/WMI, PS version, drives, DNS lookups, downloading files, credentials prompts, basic network tests, event log queries, scheduled execution patterns, and PSRemoting basics. Cleaned syntax.

PowerShell Environment Commands & Snippets

PowerShell quick reference for help/discovery, services/processes/WMI, PS version, drives, DNS lookups, downloading files, credentials prompts, basic network tests, event log queries, scheduled execution patterns, and PSRemoting basics. Cleaned syntax.


PowerShell basics / discovery

Stop-Transcript

@aw-junaid
aw-junaid / Windows Batch Scripting.md
Created January 30, 2026 18:09
Comprehensive guide to Windows batch scripting for network reconnaissance, security testing, and system administration. Learn ping sweeps, brute forcing, DHCP exhaustion, task scheduling, and automation techniques with practical examples.

Windows Batch Scripting for Network Operations & Security Testing

Comprehensive guide to Windows batch scripting for network reconnaissance, security testing, and system administration. Learn ping sweeps, brute forcing, DHCP exhaustion, task scheduling, and automation techniques with practical examples.


Ping Sweep - Network Discovery

for /L %%i in (10,1,254) do @(
 for /L %%x in (10,1,254) do @(
@aw-junaid
aw-junaid / nse.md
Created January 30, 2026 18:14
Comprehensive guide to network service testing including SSH, HTTP, FTP, SMTP, DNS, database, and remote desktop protocols. Commands for connection, scanning, enumeration, and security assessment across common ports and services.

Network Service Enumeration & Security Testing Commands

Comprehensive guide to network service testing including SSH, HTTP, FTP, SMTP, DNS, database, and remote desktop protocols. Commands for connection, scanning, enumeration, and security assessment across common ports and services.


SSH (Port 22)

Connect to SSH service: