From dcffd3c0b9ce747a2488b433e4fe5f534dca6300 Mon Sep 17 00:00:00 2001 From: alexrf45 Date: Sat, 11 May 2024 19:50:07 -0400 Subject: [PATCH 01/11] files for vps, added homebrew --- resources/bash/bashrc | 3 +++ resources/bash/profile | 6 +----- sources/0-base.sh | 4 ++++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/resources/bash/bashrc b/resources/bash/bashrc index 664639b..4bafa45 100644 --- a/resources/bash/bashrc +++ b/resources/bash/bashrc @@ -25,3 +25,6 @@ PS1="\[\033[0;31m\]\342\224\214\342\224\200$([[ $? != 0 ]] && echo "[\[\033[0;31 # if you have a need to set up ssh presistance #eval $(ssh-agent) >/dev/null 2>&1 +# + +eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" diff --git a/resources/bash/profile b/resources/bash/profile index fcd01ca..8615bca 100644 --- a/resources/bash/profile +++ b/resources/bash/profile @@ -1,4 +1,4 @@ -export PATH="$PATH:$HOME/.local/bin:$HOME/.npm-global/bin:$GOPATH:$GOROOT" +export PATH="$PATH:$HOME/.local/bin:$HOME/.npm-global/bin" export EDITOR=vim export TERM='xterm-256color' @@ -6,10 +6,6 @@ export VISUAL=vim export TMUX_SCRIPT="$HOME/.config/tmux" export AGENT='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36' export TZ='America/New_York' -export GOPATH=$HOME/.local/bin/go -export GOROOT=$HOME/.local/bin/go/bin -export GOPROXY='https://proxy.golang.org,direct' -export GOSUMBDB='sum.golang.org' #aws-cli ENV export AWS_REGION=us-east-1 diff --git a/sources/0-base.sh b/sources/0-base.sh index 366eecc..7c4e0a6 100644 --- a/sources/0-base.sh +++ b/sources/0-base.sh @@ -13,6 +13,10 @@ base() { ntp ntpdate bash-completion } +home_brew() { + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +} + network() { sudo apt-get install -y \ netcat-traditional socat \ From a84c6c03099ff4b13df195a4681369b84127b81f Mon Sep 17 00:00:00 2001 From: fr3d <76225810+alexrf45@users.noreply.github.com> Date: Sat, 18 May 2024 17:09:26 -0400 Subject: [PATCH 02/11] Zsh (#13) * seclists default wordlists (#11) * files for vps, added homebrew (#12) * zsh testing --- .github/workflows/dev.yml | 2 +- Dockerfile | 5 +-- resources/bash/aliases | 1 + resources/bash/bashrc | 2 +- resources/starship.toml | 85 --------------------------------------- resources/tmux.conf | 17 +++----- resources/zsh/.zshrc | 2 + sources/0-base.sh | 8 +++- sources/1-tools.sh | 14 +++---- sources/3-wordlists.sh | 29 ------------- sources/4-home.sh | 16 +++++--- 11 files changed, 37 insertions(+), 144 deletions(-) delete mode 100644 resources/starship.toml delete mode 100644 sources/3-wordlists.sh diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index d9f8c9f..e2bf1a1 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -2,7 +2,7 @@ name: Publish Docker Image on: push: branches: - - 'dev' + - '*' jobs: docker: runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index accce89..4e0cf94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,8 +29,7 @@ RUN sudo chown -R kali:kali /tmp/sources/* && sudo chmod +x /tmp/sources/*.sh RUN /tmp/sources/0-base.sh && \ /tmp/sources/1-tools.sh && \ - /tmp/sources/2-tools.sh && \ - /tmp/sources/3-wordlists.sh + /tmp/sources/2-tools.sh COPY resources /home/kali/resources/ @@ -42,7 +41,7 @@ USER kali RUN pipx ensurepath && pipx install impacket certipy-ad git+https://github.com/Pennyw0rth/NetExec -RUN bash +RUN zsh diff --git a/resources/bash/aliases b/resources/bash/aliases index 4ea1642..1733004 100644 --- a/resources/bash/aliases +++ b/resources/bash/aliases @@ -8,6 +8,7 @@ alias public='curl wtfismyip.com/text' alias t='tmux new -f ~/.tmux.conf -s $1' alias webserver="miniserve -p 8001" alias :q='exit' +alias c='clear' alias home='cd ~' alias :r='. ~/.bashrc' alias update='sudo apt update' diff --git a/resources/bash/bashrc b/resources/bash/bashrc index 4bafa45..77e8075 100644 --- a/resources/bash/bashrc +++ b/resources/bash/bashrc @@ -1,6 +1,6 @@ shopt -s histappend shopt -s checkwinsize -HISTFILE="$HOME/.history" +HISTFILE="$HOME/.kali_history" HISTSIZE=1000 HISTFILESIZE=2000 HISTCONTROL=ignoreboth diff --git a/resources/starship.toml b/resources/starship.toml deleted file mode 100644 index 3fb943e..0000000 --- a/resources/starship.toml +++ /dev/null @@ -1,85 +0,0 @@ -# Get editor completions based on the config schema -"$schema" = 'https://starship.rs/config-schema.json' - -# Use custom format -format = """$container -$time $directory $python $git_branch $git_commit $git_status $aws $azure $terraform $kubernetes -\\$ """ -# Wait 10 milliseconds for starship to check files under the current directory. -scan_timeout = 5 - -# Disable the blank line at the start of the prompt -add_newline = true - -[line_break] -disabled = false - -[container] -format = '[$symbol \[$name\]]($style) ' -style = "bold red dimmed" - -[python] -symbol = "👾 " -pyenv_version_name = true -style = "#FF5555" - -[aws] -format = '[$symbol ($profile )(\($region\) )]($style)' -style = "bold orange" -symbol = "☁️" -[aws.region_aliases] -us-east-1 = "va" -[aws.profile_aliases] -Admin = 'Administrator' -acct-admin= 'account-admin' - -[gcloud] -disabled = false -format = ' IAM: [$symbol$account(@$domain)(\($project\))]($style) ' -style = "#FEFB61" -symbol = "" - -[time] -disabled = false -format = " [$time]($style) " -style = "bold white" -use_12hr = false -time_format = "%Y/%m/%d %T" -utc_time_offset = "+9" -time_range="-" # always: time_range="00:00:00-23:59:59" - -[directory] -read_only = " " -truncation_length = 2 -truncate_to_repo = true # truncates directory to root folder if in github repo -style = "green" - -[git_branch] -format = " [$symbol $branch]($style) " -symbol = "🌳" -style = "bold pink" - - -[git_commit] -commit_hash_length = 8 -style = "bold white" - -[pulumi] -symbol = "⚙️ " -format = " [$symbol $stack]($style)" -style = "bright-purple" -disabled = false - -[terraform] -format = " [ 󱁢 $version $workspace]($style) " -style = "#BD93F9" - -[kubernetes] -format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' -disabled = false - -[azure] -disabled = true -format = "on [$symbol($subscription)]($style) " -symbol = "ﴃ " -style = "blue bold" diff --git a/resources/tmux.conf b/resources/tmux.conf index aecbbc4..cfdab91 100644 --- a/resources/tmux.conf +++ b/resources/tmux.conf @@ -4,8 +4,8 @@ set -g default-command /bin/bash # remap prefix from 'C-b' to 'C-a' unbind C-b -set -g prefix C-Space -bind C-Space send-prefix +set -g prefix C-a +bind C-a send-prefix #toggle status bar @@ -60,18 +60,16 @@ set -g window-status-style 'fg=#665c54' set -g status-style default -set -g status-right-length 140 +set -g status-right-length 100 set -g status-right-style default set -g status-right ' #[fg=#665c54]%a %d %b %Y %T' -set -g status-left-length 140 -#set -g status-left ' #[fg=#E82424]#($TMUX_SCRIPT/get_ip.sh tun0) #[fg=#7FB4CA]k3s: #[fg=#7FB4CA]#($TMUX_SCRIPT/kube.sh) ' -set -g status-left '#[fg=green]#($TMUX_SCRIPT/get_ip.sh tun0) ' +set -g status-left-length 70 +set -g status-left '#[fg=green]#S ' -#set -g status-left ' #[fg=white]kubernetes : #($TMUX_SCRIPT/kube.sh) ' # Center the window list -set -g status-justify centre +set -g status-justify left set -g status-position top #refresh the status bar every second @@ -85,10 +83,7 @@ set -g visual-activity off #activate tpm set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' -set -g @plugin 'omerxx/tmux-sessionx' -set -g @plugin 'wfxr/tmux-power' -set -g @tmux_power_theme '#cc241d' # red # bootstrap tpm if "test ! -d ~/.tmux/plugins/tpm" \ "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" diff --git a/resources/zsh/.zshrc b/resources/zsh/.zshrc index 6e353f1..1b8db52 100644 --- a/resources/zsh/.zshrc +++ b/resources/zsh/.zshrc @@ -28,6 +28,8 @@ fpath=(/tmp/zsh-completions/src $fpath) plugins=( git docker +zsh-autosuggestions +zsh-syntax-highlighting ) source $HOME/.oh-my-zsh/oh-my-zsh.sh diff --git a/sources/0-base.sh b/sources/0-base.sh index 7c4e0a6..8a3d029 100644 --- a/sources/0-base.sh +++ b/sources/0-base.sh @@ -10,7 +10,11 @@ base() { python3-virtualenv libpcap-dev \ jq xpdf pipx man-db exploitdb \ rpcbind nfs-common feh cmake \ - ntp ntpdate bash-completion + ntp ntpdate bash-completion zsh +} + +home_brew() { + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" } home_brew() { @@ -45,7 +49,7 @@ osint_tools() { csvtool vinetto \ sqlitebrowser exiflooter \ h8mail reconspider \ - sn0int + sn0int cewl seclists } base diff --git a/sources/1-tools.sh b/sources/1-tools.sh index 859779a..54b4963 100644 --- a/sources/1-tools.sh +++ b/sources/1-tools.sh @@ -23,12 +23,12 @@ password() { sudo apt-get install -y crunch } -install_go() { - wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz && - sudo rm -rf /usr/local/go && - tar -C $HOME/.local/bin -xzf go1.22.0.linux-amd64.tar.gz && - rm go1.22.0.linux-amd64.tar.gz -} +# install_go() { +# wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz && +# sudo rm -rf /usr/local/go && +# tar -C $HOME/.local/bin -xzf go1.22.0.linux-amd64.tar.gz && +# rm go1.22.0.linux-amd64.tar.gz +# } payload() { cd $HOME/tools/ && @@ -87,7 +87,7 @@ extra() { web web_server -install_go +#install_go password payload active_directory diff --git a/sources/3-wordlists.sh b/sources/3-wordlists.sh deleted file mode 100644 index d8e2de6..0000000 --- a/sources/3-wordlists.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -mkdir -p $HOME/.wordlists - -wget "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/Logins.fuzz.txt" -q -O $HOME/.wordlists/logins.txt - -wget "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/common-api-endpoints-mazen160.txt" -q -O $HOME/.wordlists/api.txt - -wget "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/common.txt" -q -O $HOME/.wordlists/common.txt - -wget "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/directory-list-2.3-small.txt" -q -O $HOME/.wordlists/dir-list.txt - -wget "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/raft-small-words-lowercase.txt" -q -O $HOME/.wordlists/raft-small.txt - -wget "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/Common-PHP-Filenames.txt" -q -O $HOME/.wordlists/php.txt - -wget "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/api/api-endpoints.txt" -q -O $HOME/.wordlists/api-wild.txt - -wget "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Fuzzing/fuzz-Bo0oM-friendly.txt" -q -O $HOME/.wordlists/fuzz-1.txt - -wget "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Fuzzing/LFI/LFI-Jhaddix.txt" -q -O $HOME/.wordlists/LFI.txt - -wget "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Fuzzing/SQLi/Generic-BlindSQLi.fuzzdb.txt" -q -O $HOME/.wordlists/SQL.txt - -wget "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/DNS/subdomains-top1million-20000.txt" -q -O $HOME/.wordlists/dns.txt - -wget "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/DNS/bitquark-subdomains-top100000.txt" -q -O $HOME/.wordlists/dns-1.txt - -wget "https://raw.githubusercontent.com/jeanphorn/wordlist/master/usernames.txt" -q -O $HOME/.wordlists/usernames.txt diff --git a/sources/4-home.sh b/sources/4-home.sh index b9a5c4e..bcd12ce 100644 --- a/sources/4-home.sh +++ b/sources/4-home.sh @@ -10,14 +10,20 @@ mkdir -p $HOME/.config && cp /home/kali/resources/tmux.conf /home/kali/.tmux.con git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm -cp /home/kali/resources/bash/bashrc $HOME/.bashrc +sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended -cp /home/kali/resources/bash/profile .profile +git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions -cp /home/kali/resources/bash/aliases .aliases +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting + +cp /home/kali/resources/zsh/.zshrc $HOME/.zshrc + +cp /home/kali/resources/zsh/.zprofile $HOME/.zprofile + +cp /home/kali/resources/zsh/aliases $HOME/aliases cp /home/kali/resources/bash/history .commands -mkdir .bash +mkdir .zsh -cp /home/kali/resources/bash/functions.sh .bash/functions.sh +cp /home/kali/resources/bash/functions.sh $HOME/.zsh/functions.sh From 327eebff900a5e404798e23d002924e60736b22e Mon Sep 17 00:00:00 2001 From: alexrf45 Date: Wed, 22 May 2024 20:47:12 -0400 Subject: [PATCH 03/11] zsh, burpsuite, x11 fix --- Dockerfile | 10 +- resources/.BurpSuite/UserConfigCommunity.json | 409 ++++++++ .../.BurpSuite/WorkspaceConfigCommunity.json | 870 ++++++++++++++++++ resources/bash/aliases | 2 +- resources/zsh/aliases | 21 +- sources/0-base.sh | 11 +- sources/1-tools.sh | 3 +- sources/4-home.sh | 5 +- 8 files changed, 1306 insertions(+), 25 deletions(-) create mode 100644 resources/.BurpSuite/UserConfigCommunity.json create mode 100644 resources/.BurpSuite/WorkspaceConfigCommunity.json diff --git a/Dockerfile b/Dockerfile index 4e0cf94..7da70fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM kalilinux/kali-rolling:latest LABEL "project"="aegis" LABEL "author"="fr3d" -LABEL "version"="v1.3.2" +LABEL "version"="v1.4.0" ENV DEBIAN_FRONTEND noninteractive ENV TZ="America/New_York" @@ -27,9 +27,11 @@ COPY sources/ /tmp/sources RUN sudo chown -R kali:kali /tmp/sources/* && sudo chmod +x /tmp/sources/*.sh -RUN /tmp/sources/0-base.sh && \ - /tmp/sources/1-tools.sh && \ - /tmp/sources/2-tools.sh +RUN /tmp/sources/0-base.sh + +RUN /tmp/sources/1-tools.sh + +RUN /tmp/sources/2-tools.sh COPY resources /home/kali/resources/ diff --git a/resources/.BurpSuite/UserConfigCommunity.json b/resources/.BurpSuite/UserConfigCommunity.json new file mode 100644 index 0000000..4925919 --- /dev/null +++ b/resources/.BurpSuite/UserConfigCommunity.json @@ -0,0 +1,409 @@ +{ + "user_options":{ + "bchecks":{ + "imported_scripts":[] + }, + "connections":{ + "platform_authentication":{ + "credentials":[], + "do_platform_authentication":true, + "prompt_on_authentication_failure":false + }, + "socks_proxy":{ + "dns_over_socks":false, + "host":"", + "password":"", + "port":0, + "use_proxy":false, + "username":"" + }, + "upstream_proxy":{ + "servers":[] + } + }, + "display":{ + "character_sets":{ + "mode":"recognize_automatically" + }, + "html_rendering":{ + "allow_http_requests":true + }, + "http_message_display":{ + "font_name":"Monospaced", + "font_size":13, + "font_smoothing":true, + "highlight_requests":true, + "highlight_responses":true, + "pretty_print_by_default":true + }, + "table_appearance":{ + "zebra_striping":true + }, + "user_interface":{ + "font_size":13, + "look_and_feel":"Dark" + } + }, + "extender":{ + "extensions":[], + "java":{ + "folder_for_loading_library_jar_files":"" + }, + "python":{ + "folder_for_loading_modules":"", + "location_of_jython_standalone_jar_file":"" + }, + "ruby":{ + "location_of_jruby_jar_file":"" + }, + "settings":{ + "automatically_reload_extensions_on_startup":true, + "automatically_update_bapps_on_startup":true + } + }, + "intruder":{ + "tab_bar_layout":"wrapped" + }, + "misc":{ + "api":{ + "address":"", + "enabled":false, + "insecure_mode":false, + "keys":[], + "listen_mode":"loopback_only", + "port":1337 + }, + "automatic_project_backup":{ + "delete_on_shutdown":true, + "enabled":true, + "in_scope_only":false, + "interval":30, + "show_progress":true + }, + "embedded_browser":{ + "allow_saving_browser_settings":true, + "browser_data_directory":"" + }, + "enable_proxy_interception_at_startup":"never", + "exceptions_log_directory":"", + "hotkeys":[ + { + "action":"send_to_repeater", + "hotkey":"Ctrl+R" + }, + { + "action":"send_to_intruder", + "hotkey":"Ctrl+I" + }, + { + "action":"send_to_organizer", + "hotkey":"Ctrl+O" + }, + { + "action":"forward_intercepted_proxy_message", + "hotkey":"Ctrl+F" + }, + { + "action":"toggle_proxy_interception", + "hotkey":"Ctrl+T" + }, + { + "action":"issue_repeater_request", + "hotkey":"Ctrl+Space" + }, + { + "action":"switch_to_dashboard", + "hotkey":"Ctrl+Shift+D" + }, + { + "action":"switch_to_target", + "hotkey":"Ctrl+Shift+T" + }, + { + "action":"switch_to_proxy", + "hotkey":"Ctrl+Shift+P" + }, + { + "action":"switch_to_intruder", + "hotkey":"Ctrl+Shift+I" + }, + { + "action":"switch_to_repeater", + "hotkey":"Ctrl+Shift+R" + }, + { + "action":"switch_to_logger", + "hotkey":"Ctrl+Shift+L" + }, + { + "action":"switch_to_organizer", + "hotkey":"Ctrl+Shift+O" + }, + { + "action":"go_to_previous_tab", + "hotkey":"Ctrl+Minus" + }, + { + "action":"go_to_next_tab", + "hotkey":"Ctrl+Equals" + }, + { + "action":"editor_cut", + "hotkey":"Ctrl+X" + }, + { + "action":"editor_copy", + "hotkey":"Ctrl+C" + }, + { + "action":"editor_paste", + "hotkey":"Ctrl+V" + }, + { + "action":"editor_undo", + "hotkey":"Ctrl+Z" + }, + { + "action":"editor_redo", + "hotkey":"Ctrl+Y" + }, + { + "action":"editor_select_all", + "hotkey":"Ctrl+A" + }, + { + "action":"editor_search", + "hotkey":"Ctrl+S" + }, + { + "action":"editor_go_to_previous_search_match", + "hotkey":"Ctrl+Comma" + }, + { + "action":"editor_go_to_next_search_match", + "hotkey":"Ctrl+Period" + }, + { + "action":"editor_url_decode", + "hotkey":"Ctrl+Shift+U" + }, + { + "action":"editor_url_encode_key_characters", + "hotkey":"Ctrl+U" + }, + { + "action":"editor_html_decode", + "hotkey":"Ctrl+Shift+H" + }, + { + "action":"editor_html_encode_key_characters", + "hotkey":"Ctrl+H" + }, + { + "action":"editor_base64_decode", + "hotkey":"Ctrl+Shift+B" + }, + { + "action":"editor_base64_encode", + "hotkey":"Ctrl+B" + }, + { + "action":"editor_backspace_word", + "hotkey":"Ctrl+Backspace" + }, + { + "action":"editor_delete_word", + "hotkey":"Ctrl+Delete" + }, + { + "action":"editor_delete_line", + "hotkey":"Ctrl+D" + }, + { + "action":"editor_go_to_previous_word", + "hotkey":"Ctrl+Left" + }, + { + "action":"editor_go_to_previous_word_extend_selection", + "hotkey":"Ctrl+Shift+Left" + }, + { + "action":"editor_go_to_next_word", + "hotkey":"Ctrl+Right" + }, + { + "action":"editor_go_to_next_word_extend_selection", + "hotkey":"Ctrl+Shift+Right" + }, + { + "action":"editor_go_to_previous_paragraph", + "hotkey":"Ctrl+Up" + }, + { + "action":"editor_go_to_previous_paragraph_extend_selection", + "hotkey":"Ctrl+Shift+Up" + }, + { + "action":"editor_go_to_next_paragraph", + "hotkey":"Ctrl+Down" + }, + { + "action":"editor_go_to_next_paragraph_extend_selection", + "hotkey":"Ctrl+Shift+Down" + }, + { + "action":"editor_go_to_start_of_document", + "hotkey":"Ctrl+Home" + }, + { + "action":"editor_go_to_start_of_document_extend_selection", + "hotkey":"Ctrl+Shift+Home" + }, + { + "action":"editor_go_to_end_of_document", + "hotkey":"Ctrl+End" + }, + { + "action":"editor_go_to_end_of_document_extend_selection", + "hotkey":"Ctrl+Shift+End" + } + ], + "http_message_search":{ + "autoscroll_to_match_by_default":false, + "case_sensitive_by_default":false, + "regex_by_default":false + }, + "inspector_display_mode":"auto-expand", + "inspector_position":"right", + "inspector_widget_configurations":[ + { + "open_by_default":false, + "show":true, + "type":"request_attributes", + "wrap_text":false + }, + { + "open_by_default":false, + "show":true, + "type":"request_query_parameters", + "wrap_text":false + }, + { + "open_by_default":false, + "show":true, + "type":"request_body_parameters", + "wrap_text":false + }, + { + "open_by_default":false, + "show":true, + "type":"request_cookies", + "wrap_text":false + }, + { + "open_by_default":false, + "show":true, + "type":"request_headers", + "wrap_text":false + }, + { + "open_by_default":false, + "show":true, + "type":"response_headers", + "wrap_text":false + } + ], + "log_exceptions_to_local_directory":false, + "message_editor_request_configurations":[ + { + "show":true, + "type":"pretty" + }, + { + "show":true, + "type":"raw" + }, + { + "show":true, + "type":"hex" + }, + { + "show":false, + "type":"headers", + "wrap_text":false + }, + { + "show":false, + "type":"query_parameters", + "wrap_text":false + }, + { + "show":false, + "type":"body_parameters", + "wrap_text":false + }, + { + "show":false, + "type":"cookies", + "wrap_text":false + }, + { + "show":false, + "type":"attributes", + "wrap_text":false + } + ], + "message_editor_response_configurations":[ + { + "show":true, + "type":"pretty" + }, + { + "show":true, + "type":"raw" + }, + { + "show":true, + "type":"hex" + }, + { + "show":true, + "type":"render" + }, + { + "show":false, + "type":"headers", + "wrap_text":false + } + ], + "out_of_scope_history_logging_action":"prompt", + "pause_tasks_at_startup_default":true, + "show_learn_tab":true, + "submit_feedback":false, + "suppress_confirm_on_close":false, + "temporary_files_location":"" + }, + "proxy":{ + "http_history":{ + "sort_column":"#", + "sort_order":"unsorted" + }, + "websockets_history":{ + "sort_column":"#", + "sort_order":"unsorted" + } + }, + "repeater":{ + "tab_bar_layout":"wrapped" + }, + "ssl":{ + "client_certificates":{ + "certificates":[] + }, + "negotiation":{ + "disable_sni_extension":false, + "enable_blocked_algorithms":true + } + } + } +} \ No newline at end of file diff --git a/resources/.BurpSuite/WorkspaceConfigCommunity.json b/resources/.BurpSuite/WorkspaceConfigCommunity.json new file mode 100644 index 0000000..0242e62 --- /dev/null +++ b/resources/.BurpSuite/WorkspaceConfigCommunity.json @@ -0,0 +1,870 @@ +{ + "suite":{ + "components":[ + { + "hidden":false, + "id":"Dashboard" + }, + { + "hidden":false, + "id":"Target" + }, + { + "hidden":false, + "id":"Proxy" + }, + { + "hidden":false, + "id":"Intruder" + }, + { + "hidden":false, + "id":"Decoder" + }, + { + "hidden":false, + "id":"Repeater" + }, + { + "hidden":false, + "id":"Collaborator" + }, + { + "hidden":false, + "id":"Sequencer" + }, + { + "hidden":false, + "id":"Comparer" + }, + { + "hidden":false, + "id":"Logger" + }, + { + "hidden":false, + "id":"Organizer" + }, + { + "hidden":false, + "id":"Extensions" + }, + { + "hidden":false, + "id":"Learn" + } + ] + }, + "tables":[ + { + "columns":[ + { + "id":"Time", + "position-index":0, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":0 + }, + { + "id":"Source", + "position-index":1, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":76 + }, + { + "id":"Issue type", + "position-index":2, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":305 + }, + { + "id":"Host", + "position-index":3, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":152 + }, + { + "id":"Path", + "position-index":4, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":305 + }, + { + "id":"Insertion point", + "position-index":5, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":152 + }, + { + "id":"Severity", + "position-index":6, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":114 + }, + { + "id":"Confidence", + "position-index":7, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":114 + }, + { + "id":"Comment", + "position-index":8, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":0 + } + ], + "id":"dashboardAllIssues" + }, + { + "columns":[ + { + "id":"Time", + "position-index":0, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":926 + }, + { + "id":"Type", + "position-index":1, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":371 + }, + { + "id":"Source", + "position-index":2, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":463 + }, + { + "id":"Message", + "position-index":3, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":1626 + } + ], + "id":"dashboardEventLog" + }, + { + "columns":[ + { + "id":"#", + "position-index":0, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":91 + }, + { + "id":"Host", + "position-index":1, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":386 + }, + { + "id":"Method", + "position-index":2, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":124 + }, + { + "id":"URL", + "position-index":3, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":465 + }, + { + "id":"Params", + "position-index":4, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":124 + }, + { + "id":"Edited", + "position-index":5, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":124 + }, + { + "id":"Status code", + "position-index":6, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":185 + }, + { + "id":"Length", + "position-index":7, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":124 + }, + { + "id":"MIME type", + "position-index":8, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":154 + }, + { + "id":"Extension", + "position-index":9, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":154 + }, + { + "id":"Title", + "position-index":10, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":309 + }, + { + "id":"Notes", + "position-index":11, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":229 + }, + { + "id":"TLS", + "position-index":12, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":91 + }, + { + "id":"IP", + "position-index":13, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":248 + }, + { + "id":"Cookies", + "position-index":14, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":248 + }, + { + "id":"Time", + "position-index":15, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":185 + }, + { + "id":"Listener port", + "position-index":16, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":185 + }, + { + "id":"Start response timer", + "position-index":17, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":false, + "width":91 + }, + { + "id":"End response timer", + "position-index":18, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":false, + "width":91 + } + ], + "id":"proxyHttpHistory" + }, + { + "columns":[ + { + "id":"#", + "position-index":0, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":45 + }, + { + "id":"URL", + "position-index":1, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":229 + }, + { + "id":"Direction", + "position-index":2, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":114 + }, + { + "id":"Edited", + "position-index":3, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":61 + }, + { + "id":"Length", + "position-index":4, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":76 + }, + { + "id":"Notes", + "position-index":5, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":114 + }, + { + "id":"TLS", + "position-index":6, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":45 + }, + { + "id":"Time", + "position-index":7, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":91 + }, + { + "id":"Listener port", + "position-index":8, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":91 + }, + { + "id":"WebSocket ID", + "position-index":9, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":106 + } + ], + "id":"proxyWsHistory" + }, + { + "columns":[ + { + "id":"#", + "position-index":0, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":53 + }, + { + "id":"Time", + "position-index":1, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":152 + }, + { + "id":"Status", + "position-index":2, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":122 + }, + { + "id":"Tool", + "position-index":3, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":152 + }, + { + "id":"Method", + "position-index":4, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":61 + }, + { + "id":"Host", + "position-index":5, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":152 + }, + { + "id":"Path", + "position-index":6, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":152 + }, + { + "id":"Query", + "position-index":7, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":152 + }, + { + "id":"Param count", + "position-index":8, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":106 + }, + { + "id":"Status code", + "position-index":9, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":106 + }, + { + "id":"Length", + "position-index":10, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":61 + }, + { + "id":"Notes", + "position-index":11, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":152 + } + ], + "id":"organiser" + }, + { + "columns":[ + { + "id":"Host", + "position-index":0, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":436 + }, + { + "id":"Method", + "position-index":1, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":175 + }, + { + "id":"URL", + "position-index":2, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":436 + }, + { + "id":"Params", + "position-index":3, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":175 + }, + { + "id":"Status Code", + "position-index":4, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":284 + }, + { + "id":"Length", + "position-index":5, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":175 + }, + { + "id":"MIME type", + "position-index":6, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":261 + }, + { + "id":"Title", + "position-index":7, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":436 + }, + { + "id":"Notes", + "position-index":8, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":438 + }, + { + "id":"Time Requested", + "position-index":9, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":261 + } + ], + "id":"targetMap" + }, + { + "columns":[ + { + "id":"#", + "position-index":0, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":117 + }, + { + "id":"Time", + "position-index":1, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":396 + }, + { + "id":"Tool", + "position-index":2, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":198 + }, + { + "id":"Method", + "position-index":3, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":162 + }, + { + "id":"Protocol", + "position-index":4, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":false, + "width":61 + }, + { + "id":"Host", + "position-index":5, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":396 + }, + { + "id":"Port", + "position-index":6, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":false, + "width":45 + }, + { + "id":"URL", + "position-index":7, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":false, + "width":229 + }, + { + "id":"IP", + "position-index":8, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":false, + "width":122 + }, + { + "id":"Path", + "position-index":9, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":396 + }, + { + "id":"Query", + "position-index":10, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":396 + }, + { + "id":"Param count", + "position-index":11, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":276 + }, + { + "id":"Param names", + "position-index":12, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":false, + "width":152 + }, + { + "id":"Status code", + "position-index":13, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":237 + }, + { + "id":"Length", + "position-index":14, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":159 + }, + { + "id":"MIME type", + "position-index":15, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":false, + "width":76 + }, + { + "id":"Extension", + "position-index":16, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":false, + "width":76 + }, + { + "id":"Page title", + "position-index":17, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":false, + "width":152 + }, + { + "id":"Start response timer", + "position-index":18, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":396 + }, + { + "id":"End response timer", + "position-index":19, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":false, + "width":152 + }, + { + "id":"Comment", + "position-index":20, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":true, + "width":297 + }, + { + "id":"Connection ID", + "position-index":21, + "sort":"UNSORTED", + "type":"native", + "user-resized":false, + "visible":false, + "width":91 + } + ], + "id":"logger" + } + ], + "windows":[] +} \ No newline at end of file diff --git a/resources/bash/aliases b/resources/bash/aliases index 1733004..4cd4e1c 100644 --- a/resources/bash/aliases +++ b/resources/bash/aliases @@ -11,7 +11,7 @@ alias :q='exit' alias c='clear' alias home='cd ~' alias :r='. ~/.bashrc' -alias update='sudo apt update' +alias update='sudo apt-get update' alias upgrade='sudo apt-get upgrade -y' alias i='sudo apt install -y' alias ls='ls --color=auto' diff --git a/resources/zsh/aliases b/resources/zsh/aliases index 99798a8..e39d055 100644 --- a/resources/zsh/aliases +++ b/resources/zsh/aliases @@ -1,19 +1,20 @@ -#docker -alias d='docker' -alias dimls='docker image ls' -alias dim='docker image' -alias dc='docker container' -alias dps='docker ps' -alias dnt='docker network' -alias dnuke="docker stop \$(docker ps -a -q); docker rm -f \$(docker ps -a -q); docker rmi -f \$(docker images -a -q); docker volume rm -f \$(docker volume ls -q)" - #daily use alias t='tmux new -f ~/.tmux.conf -s $1' +alias update='sudo apt get update' +alias upgrade='sudo apt get upgrade' +alias i='sudo apt get install -y' alias :q='exit' alias c='clear' alias :r='. ~/.zshrc' alias home='cd ~' - +alias cme='nxc' +alias port-scan='sudo nmap -sC -sV -p- $IP > scan.txt' +alias udp-scan='sudo nmap -sU --top-ports 10 $IP -v > udp.scan.txt' +alias stealth-scan='sudo nmap --data-length 6 -T3 -A -ttl 64 -p- $IP > stealth-scan.txt' +alias public='curl wtfismyip.com/text' +alias proxy='proxychains' +alias serve='sudo python3 -m http.server 80' +alias webserver="miniserve -p 8001" #python3 alias py-virt='python3 -m venv .venv && source .venv/bin/activate' alias freeze='pip freeze > requirements.txt' diff --git a/sources/0-base.sh b/sources/0-base.sh index 8a3d029..eba1ba4 100644 --- a/sources/0-base.sh +++ b/sources/0-base.sh @@ -13,13 +13,9 @@ base() { ntp ntpdate bash-completion zsh } -home_brew() { - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -} - -home_brew() { - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -} +# home_brew() { +# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +# } network() { sudo apt-get install -y \ @@ -53,6 +49,7 @@ osint_tools() { } base +#homebrew network active_directory osint_tools diff --git a/sources/1-tools.sh b/sources/1-tools.sh index 54b4963..a3df5ec 100644 --- a/sources/1-tools.sh +++ b/sources/1-tools.sh @@ -6,7 +6,7 @@ web() { sqlmap exiftool \ default-mysql-client \ hurl postgresql \ - arjun sqsh + arjun sqsh burpsuite } web_server() { @@ -88,6 +88,7 @@ extra() { web web_server #install_go +snyk-cli password payload active_directory diff --git a/sources/4-home.sh b/sources/4-home.sh index bcd12ce..8f8ddbd 100644 --- a/sources/4-home.sh +++ b/sources/4-home.sh @@ -6,7 +6,8 @@ mkdir -p $HOME/.config && cp /home/kali/resources/tmux.conf /home/kali/.tmux.con cp -r /home/kali/resources/proxychains.conf /home/kali/.proxychains/proxychains.conf && cp -r /home/kali/resources/kerbrute /home/kali/.local/bin/kerbrute && chmod +x /home/kali/.local/bin/kerbrute && cp /home/kali/resources/bash/history /home/kali/.history && - cp -r /home/kali/resources/ffuf /home/kali/.config/. + cp -r /home/kali/resources/ffuf /home/kali/.config/. && + cp -r /home/kali/resources/.Burpsuite /home/kali/. git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm @@ -20,7 +21,7 @@ cp /home/kali/resources/zsh/.zshrc $HOME/.zshrc cp /home/kali/resources/zsh/.zprofile $HOME/.zprofile -cp /home/kali/resources/zsh/aliases $HOME/aliases +cp /home/kali/resources/zsh/aliases $HOME/.zsh/aliases cp /home/kali/resources/bash/history .commands From d7c93b9098e0e18ddfff8129081d2858509a8c7d Mon Sep 17 00:00:00 2001 From: alexrf45 Date: Wed, 22 May 2024 21:31:44 -0400 Subject: [PATCH 04/11] testing aliases --- Dockerfile | 2 ++ bash/aegis | 2 +- resources/zsh/.zshrc | 2 -- sources/4-home.sh | 5 ++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7da70fa..a682a92 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,6 +43,8 @@ USER kali RUN pipx ensurepath && pipx install impacket certipy-ad git+https://github.com/Pennyw0rth/NetExec +RUN chsh $USER -s /bin/zsh + RUN zsh diff --git a/bash/aegis b/bash/aegis index 4714df2..fc10f10 100755 --- a/bash/aegis +++ b/bash/aegis @@ -32,7 +32,7 @@ start_container() { -v $(pwd)/.aegis-logs:$HOME/.logs:rw -v $(pwd):/$project \ -v $HOME/.Xauthority:$HOME/.Xauthority:ro \ -v /tmp/.X11-unix:/tmp/.X11-unix \ - -w /$project fonalex45/aegis:$image + -w /$project fonalex45/aegis:$image /bin/zsh } # starts the container if stopped and enters it diff --git a/resources/zsh/.zshrc b/resources/zsh/.zshrc index 1b8db52..f51210a 100644 --- a/resources/zsh/.zshrc +++ b/resources/zsh/.zshrc @@ -48,5 +48,3 @@ echo " #persistant ssh agent eval $(ssh-agent) &> /dev/null - -eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" diff --git a/sources/4-home.sh b/sources/4-home.sh index 8f8ddbd..32302a2 100644 --- a/sources/4-home.sh +++ b/sources/4-home.sh @@ -7,7 +7,8 @@ mkdir -p $HOME/.config && cp /home/kali/resources/tmux.conf /home/kali/.tmux.con cp -r /home/kali/resources/kerbrute /home/kali/.local/bin/kerbrute && chmod +x /home/kali/.local/bin/kerbrute && cp /home/kali/resources/bash/history /home/kali/.history && cp -r /home/kali/resources/ffuf /home/kali/.config/. && - cp -r /home/kali/resources/.Burpsuite /home/kali/. + cp -r /home/kali/resources/.Burpsuite /home/kali/. && + cp /home/kali/resources/zsh/aliases $HOME/.zsh/aliases git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm @@ -21,8 +22,6 @@ cp /home/kali/resources/zsh/.zshrc $HOME/.zshrc cp /home/kali/resources/zsh/.zprofile $HOME/.zprofile -cp /home/kali/resources/zsh/aliases $HOME/.zsh/aliases - cp /home/kali/resources/bash/history .commands mkdir .zsh From 062d6b7052e36a04a5ffd0d9cd5ab5a763cbd0d1 Mon Sep 17 00:00:00 2001 From: alexrf45 Date: Wed, 22 May 2024 21:40:19 -0400 Subject: [PATCH 05/11] testing chsh zsh --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a682a92..e46974a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,7 @@ USER kali RUN pipx ensurepath && pipx install impacket certipy-ad git+https://github.com/Pennyw0rth/NetExec -RUN chsh $USER -s /bin/zsh +RUN sudo chsh $USER -s /bin/zsh RUN zsh From e0f32eb042b30a825bfb1d5e6a0ed90cc945b0f5 Mon Sep 17 00:00:00 2001 From: alexrf45 Date: Wed, 22 May 2024 22:24:55 -0400 Subject: [PATCH 06/11] fix --- bash/aegis | 4 ++-- sources/4-home.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bash/aegis b/bash/aegis index fc10f10..0cceb5d 100755 --- a/bash/aegis +++ b/bash/aegis @@ -24,7 +24,7 @@ start_container() { cd $project && mkdir .aegis-logs && docker run --name $project -it \ - --net=host --entrypoint=/bin/bash \ + --net=host --entrypoint=/bin/zsh \ --cap-add=NET_ADMIN \ --cap-add=CAP_SYS_TIME \ -e DISPLAY=$DISPLAY -e DOMAIN=$DOMAIN \ @@ -42,7 +42,7 @@ enter() { --title "Starting..." \ -- sleep 3 docker container start $project && - docker exec -it $project /bin/bash + docker exec -it $project /bin/zsh } #stops container diff --git a/sources/4-home.sh b/sources/4-home.sh index 32302a2..cd778db 100644 --- a/sources/4-home.sh +++ b/sources/4-home.sh @@ -8,7 +8,7 @@ mkdir -p $HOME/.config && cp /home/kali/resources/tmux.conf /home/kali/.tmux.con cp /home/kali/resources/bash/history /home/kali/.history && cp -r /home/kali/resources/ffuf /home/kali/.config/. && cp -r /home/kali/resources/.Burpsuite /home/kali/. && - cp /home/kali/resources/zsh/aliases $HOME/.zsh/aliases + cp -r /home/kali/resources/zsh/aliases /home/kali/.zsh/aliases git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm From 2bf5db746d1eb6215fd34e50893da442ca966d3a Mon Sep 17 00:00:00 2001 From: alexrf45 Date: Wed, 22 May 2024 22:28:17 -0400 Subject: [PATCH 07/11] more testing --- resources/zsh/.zprofile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/resources/zsh/.zprofile b/resources/zsh/.zprofile index d8c6cd4..63d0ea3 100644 --- a/resources/zsh/.zprofile +++ b/resources/zsh/.zprofile @@ -1,15 +1,7 @@ - - export PATH="$PATH:$HOME/.local/bin" - export AGENT='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36' export EDITOR=vim export TERM='xterm-256color' export VISUAL=vim -#aws-cli ENV -export AWS_REGION=us-east-1 -export AWS_PAGER= -export AWS_CLI_AUTO_PROMPT=on-partial -export GPG_TTY=$(tty) From 2c728a4c78c47ef0327b98f0184b6c412e372302 Mon Sep 17 00:00:00 2001 From: alexrf45 Date: Wed, 22 May 2024 22:55:44 -0400 Subject: [PATCH 08/11] prepping for merge and new release --- deploy.sh | 4 ++-- sources/kali.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deploy.sh b/deploy.sh index ba5c844..46dea17 100755 --- a/deploy.sh +++ b/deploy.sh @@ -17,8 +17,8 @@ echo -e "pulling image now..." docker pull fonalex45/aegis:latest -cp sources/kali.sh $HOME/.config/. +cp bash/aegis $HOME/.local/. -echo 'source "$HOME/.config/kali.sh"' >>.bashrc +echo 'source "$HOME/.local/aegis"' >>.bashrc . ~/.bashrc diff --git a/sources/kali.sh b/sources/kali.sh index f9145ae..58373f4 100644 --- a/sources/kali.sh +++ b/sources/kali.sh @@ -10,7 +10,7 @@ kali $1 () { mkdir -p $1/{recon,www,exploit,pivot,report} && cd $1 && \ mkdir .kali-logs \ && docker run --name $1 -it \ - --net=host --entrypoint=/bin/bash \ + --net=host --entrypoint=/bin/zsh \ --cap-add=NET_ADMIN \ --cap-add=CAP_SYS_TIME \ -e DISPLAY=$DISPLAY -e DOMAIN=$DOMAIN \ @@ -21,7 +21,7 @@ kali $1 () { -w /$1 fonalex45/aegis:latest else docker run --name $1 -it \ - --net=host --entrypoint=/bin/bash \ + --net=host --entrypoint=/bin/zsh \ --cap-add=NET_ADMIN \ --cap-add=CAP_SYS_TIME \ -e DOMAIN=$DOMAIN -e DISPLAY=$DISPLAY \ @@ -35,12 +35,12 @@ kali $1 () { start $1 () { - docker container start $1 && docker container exec -it $1 /bin/bash + docker container start $1 && docker container exec -it $1 /bin/zsh } enter $1 () { -docker exec -it $1 /bin/bash +docker exec -it $1 /bin/zsh } stop $1 () { From b533775857aea94141b12413014b91c965eebc46 Mon Sep 17 00:00:00 2001 From: alexrf45 Date: Wed, 22 May 2024 23:35:59 -0400 Subject: [PATCH 09/11] firefox testing, aliases fix --- resources/zsh/.zshrc | 24 ++++++++++++++++++++++++ resources/zsh/aliases | 23 ----------------------- sources/0-base.sh | 2 +- sources/4-home.sh | 4 +--- 4 files changed, 26 insertions(+), 27 deletions(-) delete mode 100644 resources/zsh/aliases diff --git a/resources/zsh/.zshrc b/resources/zsh/.zshrc index f51210a..d1e4209 100644 --- a/resources/zsh/.zshrc +++ b/resources/zsh/.zshrc @@ -48,3 +48,27 @@ echo " #persistant ssh agent eval $(ssh-agent) &> /dev/null + +#daily use +alias t='tmux new -f ~/.tmux.conf -s $1' +alias update='sudo apt get update' +alias upgrade='sudo apt get upgrade' +alias i='sudo apt get install -y' +alias :q='exit' +alias c='clear' +alias :r='. ~/.zshrc' +alias home='cd ~' +alias cme='nxc' +alias port-scan='sudo nmap -sC -sV -p- $IP > scan.txt' +alias udp-scan='sudo nmap -sU --top-ports 10 $IP -v > udp.scan.txt' +alias stealth-scan='sudo nmap --data-length 6 -T3 -A -ttl 64 -p- $IP > stealth-scan.txt' +alias public='curl wtfismyip.com/text' +alias proxy='proxychains' +alias serve='sudo python3 -m http.server 80' +alias webserver="miniserve -p 8001" +#python3 +alias py-virt='python3 -m venv .venv && source .venv/bin/activate' +alias freeze='pip freeze > requirements.txt' +alias py-install='pip install -r requirements.txt' +alias py-list='pipx list | grep package' + diff --git a/resources/zsh/aliases b/resources/zsh/aliases deleted file mode 100644 index e39d055..0000000 --- a/resources/zsh/aliases +++ /dev/null @@ -1,23 +0,0 @@ -#daily use -alias t='tmux new -f ~/.tmux.conf -s $1' -alias update='sudo apt get update' -alias upgrade='sudo apt get upgrade' -alias i='sudo apt get install -y' -alias :q='exit' -alias c='clear' -alias :r='. ~/.zshrc' -alias home='cd ~' -alias cme='nxc' -alias port-scan='sudo nmap -sC -sV -p- $IP > scan.txt' -alias udp-scan='sudo nmap -sU --top-ports 10 $IP -v > udp.scan.txt' -alias stealth-scan='sudo nmap --data-length 6 -T3 -A -ttl 64 -p- $IP > stealth-scan.txt' -alias public='curl wtfismyip.com/text' -alias proxy='proxychains' -alias serve='sudo python3 -m http.server 80' -alias webserver="miniserve -p 8001" -#python3 -alias py-virt='python3 -m venv .venv && source .venv/bin/activate' -alias freeze='pip freeze > requirements.txt' -alias py-install='pip install -r requirements.txt' -alias py-list='pipx list | grep package' - diff --git a/sources/0-base.sh b/sources/0-base.sh index eba1ba4..77661e2 100644 --- a/sources/0-base.sh +++ b/sources/0-base.sh @@ -10,7 +10,7 @@ base() { python3-virtualenv libpcap-dev \ jq xpdf pipx man-db exploitdb \ rpcbind nfs-common feh cmake \ - ntp ntpdate bash-completion zsh + ntp ntpdate bash-completion zsh firefox } # home_brew() { diff --git a/sources/4-home.sh b/sources/4-home.sh index cd778db..8ff1065 100644 --- a/sources/4-home.sh +++ b/sources/4-home.sh @@ -8,9 +8,7 @@ mkdir -p $HOME/.config && cp /home/kali/resources/tmux.conf /home/kali/.tmux.con cp /home/kali/resources/bash/history /home/kali/.history && cp -r /home/kali/resources/ffuf /home/kali/.config/. && cp -r /home/kali/resources/.Burpsuite /home/kali/. && - cp -r /home/kali/resources/zsh/aliases /home/kali/.zsh/aliases - -git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm + git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended From 825a2230892667692b0dc1eb962ae969394217b0 Mon Sep 17 00:00:00 2001 From: alexrf45 Date: Wed, 22 May 2024 23:39:06 -0400 Subject: [PATCH 10/11] firefox package name --- sources/0-base.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/0-base.sh b/sources/0-base.sh index 77661e2..0937c89 100644 --- a/sources/0-base.sh +++ b/sources/0-base.sh @@ -10,7 +10,7 @@ base() { python3-virtualenv libpcap-dev \ jq xpdf pipx man-db exploitdb \ rpcbind nfs-common feh cmake \ - ntp ntpdate bash-completion zsh firefox + ntp ntpdate bash-completion zsh firefox-esr } # home_brew() { From 5ef4a530fa482f21e482879477ca5d23b7ae3e30 Mon Sep 17 00:00:00 2001 From: fr3d <76225810+alexrf45@users.noreply.github.com> Date: Fri, 5 Jul 2024 19:13:02 -0400 Subject: [PATCH 11/11] Starship (#18) * seclists default wordlists (#11) * files for vps, added homebrew (#12) * v1.4.0 (#14) * files for vps, added homebrew * Zsh (#13) * seclists default wordlists (#11) * files for vps, added homebrew (#12) * zsh testing * zsh, burpsuite, x11 fix * testing aliases * testing chsh zsh * fix * more testing * prepping for merge and new release * notepad alias * 1.4.1 testing (#16) * 1.4.1 testing * aliases fix * Error (#17) * script error * error * starship prompt --- Dockerfile | 12 ++-- README.md | 8 --- bash/aegis | 123 ----------------------------------- resources/smbserver.py | 105 ++++++++++++++++++++++++++++++ resources/starship.toml | 107 ++++++++++++++++++++++++++++++ resources/zsh/.zshrc | 26 +------- resources/zsh/aliases | 24 +++++++ resources/zsh/kali.zsh-theme | 25 +++++++ script/aegis | 123 +++++++++++++++++++++++++++++++++++ {bash => script}/deploy.sh | 0 sources/0-base.sh | 66 ++++++++++--------- sources/1-tools.sh | 106 +++++++++++++----------------- sources/4-home.sh | 28 +++++--- 13 files changed, 491 insertions(+), 262 deletions(-) delete mode 100755 bash/aegis create mode 100644 resources/smbserver.py create mode 100644 resources/starship.toml create mode 100644 resources/zsh/aliases create mode 100644 resources/zsh/kali.zsh-theme create mode 100755 script/aegis rename {bash => script}/deploy.sh (100%) diff --git a/Dockerfile b/Dockerfile index e46974a..8c992c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,9 @@ FROM kalilinux/kali-rolling:latest LABEL "project"="aegis" LABEL "author"="fr3d" -LABEL "version"="v1.4.0" +LABEL "version"="v1.4.1" -ENV DEBIAN_FRONTEND noninteractive +ENV DEBIAN_FRONTEND=noninteractive ENV TZ="America/New_York" RUN apt-get update && apt-get install sudo -y @@ -15,9 +15,9 @@ RUN groupadd --gid 1000 kali \ --gid 1000 --shell /bin/bash --skel /dev/null kali RUN chown -R kali:kali /home/kali/ \ - && echo kali:kali | chpasswd \ - && usermod -aG sudo kali \ - && echo 'kali ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/kali + && echo kali:kali | chpasswd \ + && usermod -aG sudo kali \ + && echo 'kali ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/kali WORKDIR /home/kali/ @@ -41,7 +41,7 @@ RUN sudo rm -rf /tmp/sources && sudo rm -rf /home/kali/resources USER kali -RUN pipx ensurepath && pipx install impacket certipy-ad git+https://github.com/Pennyw0rth/NetExec +RUN pipx ensurepath && pipx install impacket certipy-ad RUN sudo chsh $USER -s /bin/zsh diff --git a/README.md b/README.md index 80538c6..4ea90df 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,6 @@ Aegis is a docker image designed for any engagement. Gone are the days of spinni - Tmux inside the container (my favorite feature) -## Tmux environment - - -![Logo](https://ka-tet.s3.amazonaws.com/arch.png) - - - - ### Custom aliases included: ``` diff --git a/bash/aegis b/bash/aegis deleted file mode 100755 index 0cceb5d..0000000 --- a/bash/aegis +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/bash - -# aegis is a simple bash wrapper integrated with gum for a clean interactive TUI experience. -# -#GUM variables - -export GUM_INPUT_CURSOR_FOREGROUND="#FF0" -export GUM_INPUT_PROMPT_FOREGROUND="#00FF00" -export GUM_INPUT_PLACEHOLDER="" -export GUM_INPUT_PROMPT="enter project name: " -export GUM_INPUT_WIDTH=80 -#export BORDER_BACKGROUND="212" -export BORDER_FOREGROUND="255" -export BORDER="rounded" -export BACKGROND="212" -export FOREGROUND="67" - -#starts a container with host networking, X11 and a shared volume -start_container() { - project=$(gum input --prompt "$GUM_INPUT_PROMPT" --placeholder "$GUM_INPUT_PLACEHOLDER") - image=$(gum choose "dev" "latest") - - mkdir -p $project/{recon,www,exploit,pivot,privesc,report} && - cd $project && - mkdir .aegis-logs && - docker run --name $project -it \ - --net=host --entrypoint=/bin/zsh \ - --cap-add=NET_ADMIN \ - --cap-add=CAP_SYS_TIME \ - -e DISPLAY=$DISPLAY -e DOMAIN=$DOMAIN \ - -e TARGET=$project -e IP=$IP -e TZ=$TIME_ZONE -e NAME=$project \ - -v $(pwd)/.aegis-logs:$HOME/.logs:rw -v $(pwd):/$project \ - -v $HOME/.Xauthority:$HOME/.Xauthority:ro \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -w /$project fonalex45/aegis:$image /bin/zsh -} - -# starts the container if stopped and enters it -enter() { - project=$(gum input --prompt "$GUM_INPUT_PROMPT" --placeholder "$GUM_INPUT_PLACEHOLDER") - gum spin --spinner line \ - --title "Starting..." \ - -- sleep 3 - docker container start $project && - docker exec -it $project /bin/zsh -} - -#stops container -stop() { - project=$(gum input --prompt "$GUM_INPUT_PROMPT" --placeholder "$GUM_INPUT_PLACEHOLDER") - gum spin --spinner line \ - --title "Stopping..." \ - -- sleep 3 - - docker container stop $project -} - -#destroys contaienr and removes shared volume -destroy() { - project=$(gum input --prompt "$GUM_INPUT_PROMPT" --placeholder "$GUM_INPUT_PLACEHOLDER") - gum spin --spinner line \ - --title "POOF" \ - -- sleep 3 - gum style --align center --border $BORDER --width 10 --border-foreground $BORDER_FOREGROUND $(docker container rm $project && rm -r $project) -} - -#backs up shared volume and compresses it. useful for saving engagement artifacts -backup() { - project=$(gum input --prompt "$GUM_INPUT_PROMPT" --placeholder "$GUM_INPUT_PLACEHOLDER") - tar -zcvf "$(date '+%Y-%m-%d_%H-%M-%S%z(%Z)')_$project.tar.gz" $project -} - -#pulls latest or dev image -pull() { - - project=$(gum input --prompt "enter image tag: (dev, latest) " --placeholder " ") - gum spin --spinner meter --title "pulling $project" -- docker pull -q fonalex45/aegis:$project -} - -#help menu -show_help() { - echo 'aegis' | figlet -f shadow | lolcat && - gum style \ - --foreground $FOREGROUND --border-foreground $BORDER_FOREGROUND --border double \ - --align left --width 85 --margin "1 2" --bold --padding "1 2" \ - ' - aegis start - start a container - aegis stop - stop a container - aegis enter- enter running container - aegis destory - destory a container - aegis backup - backup shared volume - aegis pull - update to latest image (dev, latest) - aegis help - view this help menu' -} - -# Parse the command-line arguments -case "$1" in -"start") - start_container - ;; -"enter") - enter - ;; -"stop") - stop - ;; -"destroy") - destroy - ;; -"backup") - backup - ;; -"pull") - pull - ;; -"help") - show_help - ;; -*) - show_help - exit 1 - ;; -esac diff --git a/resources/smbserver.py b/resources/smbserver.py new file mode 100644 index 0000000..96ee989 --- /dev/null +++ b/resources/smbserver.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python +# Impacket - Collection of Python classes for working with network protocols. +# +# Copyright (C) 2023 Fortra. All rights reserved. +# +# This software is provided under a slightly modified version +# of the Apache Software License. See the accompanying LICENSE file +# for more information. +# +# Description: +# Simple SMB Server example. +# +# Author: +# Alberto Solino (@agsolino) +# + +import sys +import argparse +import logging + +from impacket.examples import logger +from impacket import smbserver, version +from impacket.ntlm import compute_lmhash, compute_nthash + +if __name__ == '__main__': + + # Init the example's logger theme + print(version.BANNER) + + parser = argparse.ArgumentParser(add_help = True, description = "This script will launch a SMB Server and add a " + "share specified as an argument. You need to be root in order to bind to port 445. " + "For optional authentication, it is possible to specify username and password or the NTLM hash. " + "Example: smbserver.py -comment 'My share' TMP /tmp") + + parser.add_argument('shareName', action='store', help='name of the share to add') + parser.add_argument('sharePath', action='store', help='path of the share to add') + parser.add_argument('-comment', action='store', help='share\'s comment to display when asked for shares') + parser.add_argument('-username', action="store", help='Username to authenticate clients') + parser.add_argument('-password', action="store", help='Password for the Username') + parser.add_argument('-hashes', action="store", metavar = "LMHASH:NTHASH", help='NTLM hashes for the Username, format is LMHASH:NTHASH') + parser.add_argument('-ts', action='store_true', help='Adds timestamp to every logging output') + parser.add_argument('-debug', action='store_true', help='Turn DEBUG output ON') + parser.add_argument('-ip', '--interface-address', action='store', default='0.0.0.0', help='ip address of listening interface') + parser.add_argument('-port', action='store', default='445', help='TCP port for listening incoming connections (default 445)') + parser.add_argument('-smb2support', action='store_true', default=False, help='SMB2 Support (experimental!)') + + if len(sys.argv)==1: + parser.print_help() + sys.exit(1) + + try: + options = parser.parse_args() + except Exception as e: + logging.critical(str(e)) + sys.exit(1) + + logger.init(options.ts) + + if options.debug is True: + logging.getLogger().setLevel(logging.DEBUG) + # Print the Library's installation path + logging.debug(version.getInstallationPath()) + else: + logging.getLogger().setLevel(logging.INFO) + + if options.comment is None: + comment = '' + else: + comment = options.comment + + server = smbserver.SimpleSMBServer(listenAddress=options.interface_address, listenPort=int(options.port)) + + server.addShare(options.shareName.upper(), options.sharePath, comment) + server.setSMB2Support(options.smb2support) + + # If a user was specified, let's add it to the credentials for the SMBServer. If no user is specified, anonymous + # connections will be allowed + if options.username is not None: + # we either need a password or hashes, if not, ask + if options.password is None and options.hashes is None: + from getpass import getpass + password = getpass("Password:") + # Let's convert to hashes + lmhash = compute_lmhash(password) + nthash = compute_nthash(password) + elif options.password is not None: + lmhash = compute_lmhash(options.password) + nthash = compute_nthash(options.password) + else: + lmhash, nthash = options.hashes.split(':') + + server.addCredential(options.username, 0, lmhash, nthash) + + # Here you can set a custom SMB challenge in hex format + # If empty defaults to '4141414141414141' + # (remember: must be 16 hex bytes long) + # e.g. server.setSMBChallenge('12345678abcdef00') + server.setSMBChallenge('') + + # If you don't want log to stdout, comment the following line + # If you want log dumped to a file, enter the filename + server.setLogFile('') + + # Rock and roll + server.start() diff --git a/resources/starship.toml b/resources/starship.toml new file mode 100644 index 0000000..780d51b --- /dev/null +++ b/resources/starship.toml @@ -0,0 +1,107 @@ +# Get editor completions based on the config schema +"$schema" = 'https://starship.rs/config-schema.json' + +# Use custom format +#format = """ +#(bold white)$custom $directory $git_branch $git_commit $git_status $python $line_break +#$aws $azure $terraform $kubernetes $pulumi $line_break +# > +# """ + +#right_format = '$aws $terraform' + +# Wait 10 milliseconds for starship to check files under the current directory. +scan_timeout = 5 + +# Disable the blank line at the start of the prompt +add_newline = true + +[line_break] +disabled = false + +[custom.tztime] +command = 'date +"%a %b %d %Y %T"' +when = "true" +format = ' [\[🕙 $symbol($output)\]]($style)' +style= "italic white" + +[python] +symbol = "👾 " +pyenv_version_name = true + +[aws] +format = '[$symbol ($profile )(\($region\) )]($style)' +style = "#bf5700" +symbol = "☁️" +[aws.region_aliases] +us-east-1 = "us-east-1" +[aws.profile_aliases] +Admin = 'Administrator' + +[gcloud] +disabled = false +format = ' IAM: [$symbol$account(@$domain)(\($project\))]($style) ' +style = "#FEFB61" +symbol = "" + +[time] +disabled = true +style = "bold purple" +format = "🕙 $time($style) " +time_format = "%T" +utc_time_offset = "-5" + +[username] +style_user = "green bold" +style_root = "red bold" +format = " [$user]($style) " +disabled = true +show_always = true + +[directory] +read_only = " " +truncation_length = 3 +truncate_to_repo = true # truncates directory to root folder if in github repo +style = "bold italic blue" + +[git_branch] +format = " [$symbol $branch]($style) " +symbol = "🪵 " +style = "bold yellow" + +[git_status] +conflicted = "⚔️ " +ahead = "🏎️ 💨 ×${count}" +behind = "🐢 ×${count}" +diverged = "🔱 🏎️ 💨 ×${ahead_count} 🐢 ×${behind_count}" +untracked = "🛤️ ×${count}" +stashed = "📦 " +modified = "📜 ×${count} " +staged = "🗃️ ×${count} " +renamed = "📛 ×${count}" +deleted = "🗑️ ×${count}" +style = "bright-white" +format = "$all_status$ahead_behind" + +[git_commit] +commit_hash_length = 8 +style = "bold white" + +[pulumi] +symbol = "⚙️ " +format = " [$symbol $stack]($style)" +style = "bright-purple" +disabled = false + +[terraform] +format = " [🏎💨 $version $workspace]($style) " + +[kubernetes] +format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' +disabled = false + +[azure] +disabled = false +format = "on [$symbol($subscription)]($style) " +symbol = "ﴃ " +style = "blue bold" diff --git a/resources/zsh/.zshrc b/resources/zsh/.zshrc index d1e4209..7e20eec 100644 --- a/resources/zsh/.zshrc +++ b/resources/zsh/.zshrc @@ -12,7 +12,7 @@ unsetopt beep #vi key bindings bindkey -v -ZSH_THEME="robbyrussell" +ZSH_THEME="kali" zstyle ':omz:update' mode auto # update automatically without asking @@ -49,26 +49,4 @@ echo " #persistant ssh agent eval $(ssh-agent) &> /dev/null -#daily use -alias t='tmux new -f ~/.tmux.conf -s $1' -alias update='sudo apt get update' -alias upgrade='sudo apt get upgrade' -alias i='sudo apt get install -y' -alias :q='exit' -alias c='clear' -alias :r='. ~/.zshrc' -alias home='cd ~' -alias cme='nxc' -alias port-scan='sudo nmap -sC -sV -p- $IP > scan.txt' -alias udp-scan='sudo nmap -sU --top-ports 10 $IP -v > udp.scan.txt' -alias stealth-scan='sudo nmap --data-length 6 -T3 -A -ttl 64 -p- $IP > stealth-scan.txt' -alias public='curl wtfismyip.com/text' -alias proxy='proxychains' -alias serve='sudo python3 -m http.server 80' -alias webserver="miniserve -p 8001" -#python3 -alias py-virt='python3 -m venv .venv && source .venv/bin/activate' -alias freeze='pip freeze > requirements.txt' -alias py-install='pip install -r requirements.txt' -alias py-list='pipx list | grep package' - +eval "$(starship init zsh)" diff --git a/resources/zsh/aliases b/resources/zsh/aliases new file mode 100644 index 0000000..687e3d9 --- /dev/null +++ b/resources/zsh/aliases @@ -0,0 +1,24 @@ +#daily use +alias t='tmux new -f ~/.tmux.conf -s $1' +alias update='sudo apt get update' +alias upgrade='sudo apt get upgrade' +alias i='sudo apt get install -y' +alias :q='exit' +alias c='clear' +alias :r='. ~/.zshrc' +alias home='cd ~' +alias cme='nxc' +alias port-scan='sudo nmap -sC -sV -p- $IP > scan.txt' +alias udp-scan='sudo nmap -sU --top-ports 10 $IP -v > udp.scan.txt' +alias stealth-scan='sudo nmap --data-length 6 -T3 -A -ttl 64 -p- $IP > stealth-scan.txt' +alias public='curl wtfismyip.com/text' +alias proxy='proxychains' +alias serve='sudo python3 -m http.server 80' +alias webserver="miniserve -p 8001" +alias notepad='mousepad notes.md > /dev/null 2>&1 &' +#python3 +alias py-virt='python3 -m venv .venv && source .venv/bin/activate' +alias freeze='pip freeze > requirements.txt' +alias py-install='pip install -r requirements.txt' +alias py-list='pipx list | grep package' + diff --git a/resources/zsh/kali.zsh-theme b/resources/zsh/kali.zsh-theme new file mode 100644 index 0000000..eae3f34 --- /dev/null +++ b/resources/zsh/kali.zsh-theme @@ -0,0 +1,25 @@ +# A multiline prompt with username, hostname, full path, return status, git branch, git dirty status, git remote status +# This is a modified version of the intheloop theme, with date, time, and IP address added for penetration testing logging. +# This is configured to include the IP address of eth0 for Internal network pentests. +# For External network pentests, comment out lines 13 and 14, and uncomment lines 16 and 17 in include your Internet IP address in the prompt. + +local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}" + +local host_color="white" +if [ -n "$SSH_CLIENT" ]; then + local host_color="red" +fi + +PROMPT="%{$fg_bold[grey]%}[%{$reset_color%}%{$fg_bold[${host_color}]%}%n@%m%{$reset_color%}%{$fg_bold[grey]%}]%{$reset_color%} %{$fg_bold[white]%}%10c %W %t $(ifconfig | grep -A 1 tun0 | grep inet | tr -s ' ' | cut -d ' ' -f 3) %{$reset_color%} $(git_prompt_info) $(git_remote_status) +%{$fg_bold[white]%}❯%{$reset_color%} " + +#PROMPT="%{$fg_bold[grey]%}[%{$reset_color%}%{$fg_bold[${host_color}]%}%n@%m%{$reset_color%}%{$fg_bold[grey]%}]%{$reset_color%} %{$fg_bold[blue]%}%10c %W %t $(curl -s http://ipecho.net/plain; echo) %{$reset_color%} $(git_prompt_info) $(git_remote_status) +#%{$fg_bold[cyan]%}❯%{$reset_color%} " + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[grey]%}(%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[grey]%}) %{$fg[yellow]%}⚡%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[grey]%})" +ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="%{$fg_bold[magenta]%}↓%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE="%{$fg_bold[magenta]%}↑%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="%{$fg_bold[magenta]%}↕%{$reset_color%}" diff --git a/script/aegis b/script/aegis new file mode 100755 index 0000000..c16ac97 --- /dev/null +++ b/script/aegis @@ -0,0 +1,123 @@ +#!/bin/bash + +# aegis is a simple bash wrapper integrated with gum for a clean interactive TUI experience. +# +#GUM variables + +export GUM_INPUT_CURSOR_FOREGROUND="#FF0" +export GUM_INPUT_PROMPT_FOREGROUND="#00FF00" +export GUM_INPUT_PLACEHOLDER="" +export GUM_INPUT_PROMPT="enter project name: " +export GUM_INPUT_WIDTH=80 +#export BORDER_BACKGROUND="212" +export BORDER_FOREGROUND="255" +export BORDER="rounded" +export BACKGROND="212" +export FOREGROUND="67" + +#starts a container with host networking, X11 and a shared volume +start_container() { + project=$(gum input --prompt "$GUM_INPUT_PROMPT" --placeholder "$GUM_INPUT_PLACEHOLDER") + image=$(gum choose "dev" "latest") + + mkdir -p $project/{recon,www,exploit,pivot,privesc,report} && + cd $project && + mkdir .aegis-logs && + docker run --name $project -it \ + --net=host --entrypoint=/bin/zsh \ + --cap-add=NET_ADMIN \ + --cap-add=CAP_SYS_TIME \ + -e DISPLAY=$DISPLAY -e DOMAIN=$DOMAIN \ + -e TARGET=$project -e IP=$IP -e TZ=$TIME_ZONE -e NAME=$project \ + -v $(pwd)/.aegis-logs:$HOME/.logs:rw -v $(pwd):/$project \ + -v $HOME/.Xauthority:$HOME/.Xauthority:ro \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -w /$project fonalex45/aegis:$image +} + +# starts the container if stopped and enters it +enter() { + project=$(gum input --prompt "$GUM_INPUT_PROMPT" --placeholder "$GUM_INPUT_PLACEHOLDER") + gum spin --spinner line \ + --title "Starting..." \ + -- sleep 3 + docker container start $project && + docker exec -it $project /bin/zsh +} + +#stops container +stop() { + project=$(gum input --prompt "$GUM_INPUT_PROMPT" --placeholder "$GUM_INPUT_PLACEHOLDER") + gum spin --spinner line \ + --title "Stopping..." \ + -- sleep 3 + + docker container stop $project +} + +#destroys contaienr and removes shared volume +destroy() { + project=$(gum input --prompt "$GUM_INPUT_PROMPT" --placeholder "$GUM_INPUT_PLACEHOLDER") + gum spin --spinner line \ + --title "POOF" \ + -- sleep 3 + gum style --align center --border $BORDER --width 15 --border-foreground $BORDER_FOREGROUND $(docker container rm $project && rm -r $project) +} + +#backs up shared volume and compresses it. useful for saving engagement artifacts +backup() { + project=$(gum input --prompt "$GUM_INPUT_PROMPT" --placeholder "$GUM_INPUT_PLACEHOLDER") + tar -zcvf "$(date '+%Y-%m-%d_%H-%M-%S%z(%Z)')_$project.tar.gz" $project +} + +#pulls latest or dev image +pull() { + + project=$(gum input --prompt "enter image tag: (dev, latest) " --placeholder " ") + gum spin --spinner meter --title "pulling $project" -- docker pull -q fonalex45/aegis:$project +} + +#help menu +show_help() { + echo 'aegis' | figlet -f shadow | lolcat && + gum style \ + --foreground $FOREGROUND --border-foreground $BORDER_FOREGROUND --border double \ + --align left --width 85 --margin "1 2" --bold --padding "1 2" \ + ' + aegis start - start a container + aegis stop - stop a container + aegis enter- enter running container + aegis destory - destory a container + aegis backup - backup shared volume + aegis pull - update to latest image (dev, latest) + aegis help - view this help menu' +} + +# Parse the command-line arguments +case "$1" in +"start") + start_container + ;; +"enter") + enter + ;; +"stop") + stop + ;; +"destroy") + destroy + ;; +"backup") + backup + ;; +"pull") + pull + ;; +"help") + show_help + ;; +*) + show_help + exit 1 + ;; +esac diff --git a/bash/deploy.sh b/script/deploy.sh similarity index 100% rename from bash/deploy.sh rename to script/deploy.sh diff --git a/sources/0-base.sh b/sources/0-base.sh index 0937c89..bb5b52a 100644 --- a/sources/0-base.sh +++ b/sources/0-base.sh @@ -1,16 +1,17 @@ #!/bin/bash base() { - sudo apt-get install -y \ - wget curl man git lolcat \ - figlet tmux tree mousepad \ - hexcurse file ruby ruby-dev \ - vim nano p7zip-full kali-themes \ - djvulibre-bin python3-pip \ - python3-virtualenv libpcap-dev \ - jq xpdf pipx man-db exploitdb \ - rpcbind nfs-common feh cmake \ - ntp ntpdate bash-completion zsh firefox-esr + sudo apt-get install -y \ + wget curl man git lolcat \ + figlet tmux tree mousepad \ + hexcurse file ruby ruby-dev \ + vim nano p7zip-full kali-themes \ + djvulibre-bin python3-pip \ + python3-virtualenv libpcap-dev \ + jq xpdf pipx man-db exploitdb \ + rpcbind nfs-common feh cmake \ + ntp ntpdate bash-completion zsh + } # home_brew() { @@ -18,34 +19,35 @@ base() { # } network() { - sudo apt-get install -y \ - netcat-traditional socat \ - rlwrap nmap \ - netdiscover masscan \ - dnsutils onesixtyone \ - braa tcpdump \ - ftp telnet swaks \ - snmpcheck snmpcheck \ - snmp-mibs-downloader iputils-ping \ - iproute2 proxychains \ - sendmail ltrace \ - raven faketime mitmproxy + sudo apt-get install -y \ + netcat-traditional socat \ + rlwrap nmap \ + netdiscover masscan \ + dnsutils onesixtyone \ + braa tcpdump \ + ftp telnet swaks \ + snmpcheck snmpcheck \ + snmp-mibs-downloader iputils-ping \ + iproute2 proxychains \ + sendmail ltrace \ + raven faketime mitmproxy \ + netexec } active_directory() { - sudo apt-get install -y \ - smbclient evil-winrm \ - responder powershell \ - ldap-utils enum4linux-ng \ - bloodhound.py + sudo apt-get install -y \ + smbclient evil-winrm \ + responder powershell \ + ldap-utils enum4linux-ng \ + bloodhound.py } osint_tools() { - sudo apt-get install -y \ - csvtool vinetto \ - sqlitebrowser exiflooter \ - h8mail reconspider \ - sn0int cewl seclists + sudo apt-get install -y \ + csvtool vinetto \ + sqlitebrowser exiflooter \ + h8mail reconspider \ + sn0int cewl seclists sploitscan } base diff --git a/sources/1-tools.sh b/sources/1-tools.sh index a3df5ec..411b0e2 100644 --- a/sources/1-tools.sh +++ b/sources/1-tools.sh @@ -1,93 +1,79 @@ #!/bin/bash web() { - sudo apt-get install -y \ - whatweb ffuf \ - sqlmap exiftool \ - default-mysql-client \ - hurl postgresql \ - arjun sqsh burpsuite + sudo apt-get install -y \ + whatweb ffuf \ + sqlmap exiftool \ + default-mysql-client \ + hurl postgresql \ + arjun sqsh burpsuite } web_server() { - wget https://github.com/svenstaro/miniserve/releases/download/v0.26.0/miniserve-0.26.0-x86_64-unknown-linux-gnu -q \ - -O miniserve && chmod +x ./miniserve && mv ./miniserve $HOME/.local/bin/miniserve + wget "https://github.com/svenstaro/miniserve/releases/download/v0.26.0/miniserve-0.26.0-x86_64-unknown-linux-gnu" -q \ + -O miniserve && chmod +x ./miniserve && mv ./miniserve $HOME/.local/bin/miniserve } snyk-cli() { - curl --compressed "https://static.snyk.io/cli/latest/snyk-linux?_gl=1*1elhg4m*_ga*MTI5NzM0MzE4LjE3MTQ5MTg0NDY.*_ga_X9SH3KP7B4*MTcxNDkyOTE4Ni4yLjEuMTcxNDkyOTU5NC41Ni4wLjA." -o snyk && - chmod +x ./snyk && mv ./snyk $HOME/.local/bin/snyk + curl --compressed "https://static.snyk.io/cli/latest/snyk-linux?_gl=1*1elhg4m*_ga*MTI5NzM0MzE4LjE3MTQ5MTg0NDY.*_ga_X9SH3KP7B4*MTcxNDkyOTE4Ni4yLjEuMTcxNDkyOTU5NC41Ni4wLjA." -o snyk && + chmod +x ./snyk && mv ./snyk $HOME/.local/bin/snyk } password() { - sudo apt-get install -y crunch + sudo apt-get install -y crunch } -# install_go() { -# wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz && -# sudo rm -rf /usr/local/go && -# tar -C $HOME/.local/bin -xzf go1.22.0.linux-amd64.tar.gz && -# rm go1.22.0.linux-amd64.tar.gz -# } - payload() { - cd $HOME/tools/ && - wget -q -O nc.exe \ - "https://github.com/ShutdownRepo/Exegol-resources/raw/main/windows/nc.exe" && - wget -q -O nc \ - "https://github.com/andrew-d/static-binaries/raw/master/binaries/linux/x86_64/ncat" + cd $HOME/tools/ && + wget -q -O nc.exe \ + "https://github.com/ShutdownRepo/Exegol-resources/raw/main/windows/nc.exe" && + wget -q -O nc \ + "https://github.com/andrew-d/static-binaries/raw/master/binaries/linux/x86_64/ncat" } active_directory() { - cd $HOME/tools/ && - wget -q -O rubeus.exe \ - "https://github.com/r3motecontrol/Ghostpack-CompiledBinaries/raw/master/Rubeus.exe" && - wget -q -O certify.exe \ - "https://github.com/r3motecontrol/Ghostpack-CompiledBinaries/raw/master/Certify.exe" && - #wget "https://github.com/fortra/impacket/releases/download/impacket_0_11_0/impacket-0.11.0.tar.gz" && - #gunzip impacket-0.11.0.tar.gz && tar -xvf impacket-0.11.0.tar && - # mv impacket-0.11.0/ /home/kali/.local/ && rm impacket-0.11.0.tar && - wget -q -O sharp.ps1 \ - "https://github.com/BloodHoundAD/BloodHound/raw/master/Collectors/SharpHound.ps1" && - wget -q -O SharpHound.exe \ - "https://raw.githubusercontent.com/BloodHoundAD/BloodHound/master/Collectors/SharpHound.exe" - #wget -q -O netexec \ - # "https://github.com/Pennyw0rth/NetExec/releases/download/v1.1.0/nxc" && - #chmod +x netexec && sudo mv netexec /home/kali/.local/bin/netexec + cd $HOME/tools/ && + wget -q -O rubeus.exe \ + "https://github.com/r3motecontrol/Ghostpack-CompiledBinaries/raw/master/Rubeus.exe" && + wget -q -O certify.exe \ + "https://github.com/r3motecontrol/Ghostpack-CompiledBinaries/raw/master/Certify.exe" && + wget -q -O sharp.ps1 \ + "https://github.com/BloodHoundAD/BloodHound/raw/master/Collectors/SharpHound.ps1" && + wget -q -O SharpHound.exe \ + "https://raw.githubusercontent.com/BloodHoundAD/BloodHound/master/Collectors/SharpHound.exe" } pivot() { - cd $HOME/tools/ && - wget -q -O chisel.gz \ - "https://github.com/jpillora/chisel/releases/download/v1.9.1/chisel_1.9.1_linux_amd64.gz" && - gunzip chisel.gz && - wget -q -O win-chisel.gz \ - "https://github.com/jpillora/chisel/releases/download/v1.9.1/chisel_1.9.1_windows_amd64.gz" && - gunzip win-chisel.gz + cd $HOME/tools/ && + wget -q -O chisel.gz \ + "https://github.com/jpillora/chisel/releases/download/v1.9.1/chisel_1.9.1_linux_amd64.gz" && + gunzip chisel.gz && + wget -q -O win-chisel.gz \ + "https://github.com/jpillora/chisel/releases/download/v1.9.1/chisel_1.9.1_windows_amd64.gz" && + gunzip win-chisel.gz } privesc() { - cd $HOME/tools/ && - wget -q -O linpeas \ - "https://github.com/carlospolop/PEASS-ng/releases/download/20231029-83b8fbe1/linpeas_linux_amd64" && - wget -q -O winpeas.exe \ - "https://github.com/carlospolop/PEASS-ng/releases/download/20231029-83b8fbe1/winPEASany.exe" && - wget -q -O pspys \ - "https://github.com/DominicBreuker/pspy/releases/download/v1.2.1/pspy64s" && - wget -q -O pspy \ - "https://github.com/DominicBreuker/pspy/releases/download/v1.2.1/pspy64" + cd $HOME/tools/ && + wget -q -O linpeas \ + "https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh" && + wget -q -O winpeas.exe \ + "https://github.com/peass-ng/PEASS-ng/releases/download/20240602-829055f0/winPEASx64_ofs.exe" && + wget -q -O pspys \ + "https://github.com/DominicBreuker/pspy/releases/download/v1.2.1/pspy64s" && + wget -q -O pspy \ + "https://github.com/DominicBreuker/pspy/releases/download/v1.2.1/pspy64" } extra() { - cd $HOME/tools/ && - git clone https://github.com/samratashok/nishang.git nishang && - git clone https://github.com/gustanini/PowershellTools.git powershelltools && - git clone https://github.com/aniqfakhrul/powerview.py powerview + cd $HOME/tools/ && + git clone https://github.com/samratashok/nishang.git nishang && + git clone https://github.com/gustanini/PowershellTools.git powershelltools && + git clone https://github.com/aniqfakhrul/powerview.py powerview } web web_server -#install_go snyk-cli password payload @@ -97,4 +83,4 @@ privesc extra wget -q -O $HOME/.local/bin/busybox \ - "https://busybox.net/downloads/binaries/1.35.0-x86_64-linux-musl/busybox" + "https://busybox.net/downloads/binaries/1.35.0-x86_64-linux-musl/busybox" diff --git a/sources/4-home.sh b/sources/4-home.sh index 8ff1065..279b303 100644 --- a/sources/4-home.sh +++ b/sources/4-home.sh @@ -1,14 +1,14 @@ #!/bin/bash mkdir -p $HOME/.config && cp /home/kali/resources/tmux.conf /home/kali/.tmux.conf && - cp -r /home/kali/resources/shell-upgrade.sh /home/kali/tools/shell-upgrade.sh && - cp -r /home/kali/resources/recon.sh /home/kali/.local/bin/recon.sh && chmod +x /home/kali/.local/bin/recon.sh && - cp -r /home/kali/resources/proxychains.conf /home/kali/.proxychains/proxychains.conf && - cp -r /home/kali/resources/kerbrute /home/kali/.local/bin/kerbrute && chmod +x /home/kali/.local/bin/kerbrute && - cp /home/kali/resources/bash/history /home/kali/.history && - cp -r /home/kali/resources/ffuf /home/kali/.config/. && - cp -r /home/kali/resources/.Burpsuite /home/kali/. && - git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm + cp -r /home/kali/resources/shell-upgrade.sh /home/kali/tools/shell-upgrade.sh && + cp -r /home/kali/resources/recon.sh /home/kali/.local/bin/recon.sh && chmod +x /home/kali/.local/bin/recon.sh && + cp -r /home/kali/resources/proxychains.conf /home/kali/.proxychains/proxychains.conf && + cp -r /home/kali/resources/kerbrute /home/kali/.local/bin/kerbrute && chmod +x /home/kali/.local/bin/kerbrute && + cp -r /home/kali/resources/smbserver.py /home/kali/tools/smbserver.py && + cp -r /home/kali/resources/bash/history /home/kali/.history + +sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended @@ -18,10 +18,20 @@ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM: cp /home/kali/resources/zsh/.zshrc $HOME/.zshrc +cp /home/kali/resources/zsh/kali.zsh-theme $HOME/.oh-my-zsh/custom/themes/kali.zsh-theme + cp /home/kali/resources/zsh/.zprofile $HOME/.zprofile cp /home/kali/resources/bash/history .commands mkdir .zsh -cp /home/kali/resources/bash/functions.sh $HOME/.zsh/functions.sh +cp /home/kali/resources/zsh/functions.sh $HOME/.zsh/functions.sh + +cp -r /home/kali/resources/zsh/aliases $HOME/.zsh/aliases + +cp /home/kali/resources/starship.toml $HOME/.config/starship.toml + +curl -O https://starship.rs/install.sh && + chmod +x install.sh && + ./install.sh --yes -b $HOME/.local/bin