Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .jules/sentinel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Sentinel Journal

## 2025-05-15 - Hardcoded CBC Cipher and Weak Password Generation
**Vulnerability:** The container entrypoint script explicitly configured a CBC-mode cipher (`DHE-RSA-AES256-SHA`) and generated default passwords using only digits (`0-9`).
**Learning:** Hardcoding specific cipher suites in scripts can lead to outdated security practices persisting even when the underlying software supports better options. Also, password generation scripts should maximize entropy within usability constraints.
**Prevention:** Use stronger defaults (GCM) and ensure random generation uses a larger character set (`A-Za-z0-9`).
6 changes: 4 additions & 2 deletions copyables/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ if [ ! -f $CONFIG ] || [ ! -s $CONFIG ]; then
if [[ $PASSWORD ]]; then
echo '# <use the password specified at -e PASSWORD>'
else
PASSWORD=$(cat /dev/urandom | tr -dc '0-9' | fold -w 20 | head -n 1 | sed 's/.\{4\}/&./g;s/.$//;')
# Generate a strong alphanumeric password
PASSWORD=$(cat /dev/urandom | tr -dc 'A-Za-z0-9' | fold -w 20 | head -n 1 | sed 's/.\{4\}/&./g;s/.$//;')
echo \# ${PASSWORD}
fi
fi
Expand All @@ -65,7 +66,8 @@ if [ ! -f $CONFIG ] || [ ! -s $CONFIG ]; then
# switch cipher
while :; do
set +e
vpncmd_server ServerCipherSet DHE-RSA-AES256-SHA 2>&1 >/dev/null
# Use AES-GCM cipher suite for better security (GCM vs CBC)
vpncmd_server ServerCipherSet DHE-RSA-AES256-GCM-SHA384 2>&1 >/dev/null
[[ $? -eq 0 ]] && break
set -e
sleep 1
Expand Down