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..8c992c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,9 @@ FROM kalilinux/kali-rolling:latest LABEL "project"="aegis" LABEL "author"="fr3d" -LABEL "version"="v1.3.2" +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/ @@ -27,10 +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 && \ - /tmp/sources/3-wordlists.sh +RUN /tmp/sources/0-base.sh + +RUN /tmp/sources/1-tools.sh + +RUN /tmp/sources/2-tools.sh COPY resources /home/kali/resources/ @@ -40,9 +41,11 @@ 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 -RUN bash +RUN 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 4714df2..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/bash \ - --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/bash -} - -#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/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/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 4ea1642..4cd4e1c 100644 --- a/resources/bash/aliases +++ b/resources/bash/aliases @@ -8,9 +8,10 @@ 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' +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/bash/bashrc b/resources/bash/bashrc index 664639b..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 @@ -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/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 index 3fb943e..780d51b 100644 --- a/resources/starship.toml +++ b/resources/starship.toml @@ -2,9 +2,14 @@ "$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 -\\$ """ +#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 @@ -14,24 +19,24 @@ add_newline = true [line_break] disabled = false -[container] -format = '[$symbol \[$name\]]($style) ' -style = "bold red dimmed" +[custom.tztime] +command = 'date +"%a %b %d %Y %T"' +when = "true" +format = ' [\[🕙 $symbol($output)\]]($style)' +style= "italic white" [python] symbol = "👾 " pyenv_version_name = true -style = "#FF5555" [aws] -format = '[$symbol ($profile )(\($region\) )]($style)' -style = "bold orange" +format = '[$symbol ($profile )(\($region\) )]($style)' +style = "#bf5700" symbol = "☁️" [aws.region_aliases] -us-east-1 = "va" +us-east-1 = "us-east-1" [aws.profile_aliases] Admin = 'Administrator' -acct-admin= 'account-admin' [gcloud] disabled = false @@ -40,25 +45,43 @@ 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" +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 = 2 +truncation_length = 3 truncate_to_repo = true # truncates directory to root folder if in github repo -style = "green" +style = "bold italic blue" [git_branch] format = " [$symbol $branch]($style) " -symbol = "🌳" -style = "bold pink" - +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 @@ -71,15 +94,14 @@ style = "bright-purple" disabled = false [terraform] -format = " [ 󱁢 $version $workspace]($style) " -style = "#BD93F9" +format = " [🏎💨 $version $workspace]($style) " [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false [azure] -disabled = true +disabled = false 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/.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) diff --git a/resources/zsh/.zshrc b/resources/zsh/.zshrc index 6e353f1..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 @@ -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 @@ -47,4 +49,4 @@ echo " #persistant ssh agent eval $(ssh-agent) &> /dev/null -eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" +eval "$(starship init zsh)" diff --git a/resources/zsh/aliases b/resources/zsh/aliases index 99798a8..687e3d9 100644 --- a/resources/zsh/aliases +++ b/resources/zsh/aliases @@ -1,19 +1,21 @@ -#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" +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' 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 366eecc..bb5b52a 100644 --- a/sources/0-base.sh +++ b/sources/0-base.sh @@ -1,50 +1,57 @@ #!/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 + 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() { +# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +# } + 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 + sudo apt-get install -y \ + csvtool vinetto \ + sqlitebrowser exiflooter \ + h8mail reconspider \ + sn0int cewl seclists sploitscan } base +#homebrew network active_directory osint_tools diff --git a/sources/1-tools.sh b/sources/1-tools.sh index 859779a..411b0e2 100644 --- a/sources/1-tools.sh +++ b/sources/1-tools.sh @@ -1,93 +1,80 @@ #!/bin/bash web() { - sudo apt-get install -y \ - whatweb ffuf \ - sqlmap exiftool \ - default-mysql-client \ - hurl postgresql \ - arjun sqsh + 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 -} - -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 + sudo apt-get install -y crunch } 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 active_directory @@ -96,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/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..279b303 100644 --- a/sources/4-home.sh +++ b/sources/4-home.sh @@ -1,23 +1,37 @@ #!/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/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 -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 -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/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 .bash +mkdir .zsh + +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 -cp /home/kali/resources/bash/functions.sh .bash/functions.sh +curl -O https://starship.rs/install.sh && + chmod +x install.sh && + ./install.sh --yes -b $HOME/.local/bin 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 () {