Articles by Deepak Prasad
Compare Strings in Bash
Compare strings in Bash with =, ==, !=, -z and -n. Learn empty vs unset values, substring and glob matching, case-insensitive checks, and lexical ordering.
Bash [ ] vs [[ ]] vs (( ))
Learn when to use Bash [ ], [[ ]], and (( )) for tests: POSIX test syntax, Bash conditionals, pattern and regex matching, numeric comparisons, and common failure examples.
Bash case Statement with Examples
Learn how to use the Bash case statement with practical examples, match multiple values and wildcard patterns, add a default case, and compare case with if/elif.
Bash if, elif, else with Examples
Learn Bash if, elif, and else syntax with examples for variables, multiple conditions, command exit status, nested if statements, and common errors.
Bash Arithmetic: $(( )), (( )) and Decimal Math
Learn Bash arithmetic with $(( )) and (( )), including operators, integer division, counters, number bases, and floating-point calculations with awk and bc.
Bash Exit Codes: $?, exit and Common Status Codes
Learn how Bash exit codes work, check the last status with $?, use exit, understand codes 0, 1, 126 and 127, and handle pipeline failures with PIPESTATUS and pipefail.
Concatenate Strings in Bash
Concatenate strings in Bash with adjacent expansions, ${var} brace boundaries, += append, separators, printf -v formatting, and safe patterns for command output and loops.
Get Bash Script Directory, Path and Name
Get the Bash script name, absolute path, and directory with $0, BASH_SOURCE, dirname, cd+pwd, and GNU readlink -f — including sourced files and symlinks.
Bash echo vs printf: Output and Newlines
Compare Bash echo and printf for newlines, prompts, columns, and portable scripts: echo -n, echo -e pitfalls, printf format strings, printf -v, stderr output, and safe printing of variable content.
Bash Script Arguments: $1, $#, $@, $* and shift
Learn Bash script arguments with $1, $#, $@, $*, shift, and ${10}. See how quoting preserves filenames with spaces, validate argument counts, and forward args safely to cp and other commands.
Bash read Command: Get User Input
Learn the Bash read builtin for interactive input: read into variables, use -r by default, prompt with -p, split fields with IFS, hide passwords with -s, time out with -t, and read arrays with -a.
Bash Environment Variables: Set, Export, List and Unset
Learn how Bash environment variables work with export, env, and printenv, how child processes inherit them, and how to set, list, unexport, and unset variables.
Bash Startup Files: .bashrc vs .bash_profile vs .profile
Learn when Bash reads .bashrc, .bash_profile, and .profile on login and non-login shells, how SSH and cron differ, what BASH_ENV does, and where to put PATH, aliases, and exports.
Bash Single vs Double Quotes: Differences and Examples
Compare Bash single vs double quotes with tested examples. Learn variable expansion, escaping quotes, $'...' syntax, globbing, filenames with spaces, and safe variable quoting.
Bash Variables: Create, Assign, Use and Unset
Learn how to create, assign, expand, quote, unset, and protect Bash variables with declare and readonly, plus how unset differs from empty and when to use ${var}.
Bash Comments: Single-Line, Inline and Multiline Examples
Learn Bash comment syntax with #, inline comments, quoted hash characters, multiline comments, heredoc workarounds, and how shebang lines differ from ordinary comments.
Bash vs sh: Differences and Which Shell to Use
Compare Bash vs sh with tested examples. Learn POSIX portability, Bash-only syntax, what /bin/sh runs, and when to use #!/bin/bash or #!/bin/sh.
Bash Shebang Explained: #!/bin/bash vs /usr/bin/env bash
Learn what a Bash shebang does, how #!/bin/bash differs from #!/usr/bin/env bash, when the shebang is ignored, and which one to use in shell scripts.
How to Write and Run a Bash Script in Linux
Learn how to write and run a Bash script in Linux, make it executable with chmod, understand the shebang, and fix common script errors.
How to Install GOAD-Light on Proxmox (Active Directory Hacking Lab)
Install GOAD-Light on Proxmox VE with Packer, Terraform, and Ansible, then verify the three-node Active Directory lab from Kali Linux.
How to Prioritize Vulnerabilities for Penetration Testing
Prioritize pentest findings using CVSS, EPSS, CISA KEV, reachability, exploit availability, and attack-path value to decide which vulnerabilities to validate first.
Establish Persistence on Linux and Windows After Initial Access
Learn Linux and Windows persistence techniques after initial access — cron, SSH keys, systemd, scheduled tasks, Run keys, services, local accounts, and web shells with tested lab examples and cleanup.
Lateral Movement on Windows with PsExec, WMI, and WinRM
Learn Windows lateral movement with PsExec, WMI, WinRM, NetExec, and Evil-WinRM — find admin-capable hosts and open remote shells from Kali in an authorized AD lab.
Pass-the-Hash and Pass-the-Ticket Attacks on Active Directory
Compare pass-the-hash vs pass-the-ticket in Active Directory from Kali — replay NT hashes with NetExec and Impacket, use overpass-the-hash for a Kerberos TGT, and reuse .ccache tickets on GOAD-Light.
Kerberoasting and AS-REP Roasting on Active Directory
Learn Kerberoasting vs AS-REP roasting with Impacket on Kali. Use GetUserSPNs and GetNPUsers, crack Kerberos tickets with hashcat or John, and verify recovered AD credentials on GOAD-Light.
Install Metasploitable 2 on Proxmox for a PenTest Lab
Import Metasploitable 2 into Proxmox VE from the official VMDK, attach it to vmbr1 with the right SCSI and NIC types, assign a static lab IP when DHCP is unavailable, verify services from Kali, and snapshot ms2-clean.
Install Kali Linux on Proxmox for a PenTest Lab
Install Kali Linux on Proxmox VE with dual NICs on vmbr0 and vmbr1, static IPs for management and lab traffic, SSH from your workstation, and a clean snapshot before you install tools.
Subdomain Enumeration Tools and Examples on Kali Linux
Get subdomains on Kali with Subfinder, Assetfinder, Amass, and massdns — passive enumeration, JSON source attribution, merge and resolve pipelines, and DNS validation on the authorized zonetransfer.me training zone.
Proxmox Pentest Lab Setup: Isolated Bridge and Storage
Build the Proxmox VE foundation for a penetration testing lab: an internal bridge with no physical port for attack traffic, LVM-thin and ISO storage pools, static addressing for Kali and Windows targets, and direct Web …
How to Create a Windows RAT with msfvenom and Meterpreter
Learn how to create a Windows RAT in an authorized lab with msfvenom and Meterpreter on Kali. Generate the payload, configure multi/handler, receive the callback, and verify the session.

