Skip to content

Commit

Permalink
Starship (#18)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
alexrf45 authored Jul 5, 2024
1 parent 825a223 commit 5ef4a53
Show file tree
Hide file tree
Showing 13 changed files with 491 additions and 262 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/

Expand All @@ -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

Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
Expand Down
123 changes: 0 additions & 123 deletions bash/aegis

This file was deleted.

105 changes: 105 additions & 0 deletions resources/smbserver.py
Original file line number Diff line number Diff line change
@@ -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()
107 changes: 107 additions & 0 deletions resources/starship.toml
Original file line number Diff line number Diff line change
@@ -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"
Loading

0 comments on commit 5ef4a53

Please sign in to comment.