security issues #13
Open
saksham-45 wants to merge 1 commit into
Open
Conversation
…ection Protection - Added XRDP_USERS env var support for secure credential handling - Forced TLS security layer in xrdp.ini - Implemented automatic TLS certificate generation in entrypoints - Hardened shell scripts with quoting and -- separators to prevent argument injection - Updated README with secure usage guidelines - Synchronized hardened config across Ubuntu, Fedora, and CentOS variants
Owner
|
@saksham-45 thanks for this. The original insecure command-line for user and pass is intentional, as the main purpose of this library is to test a multi-user setup and is not intended for actual users. So, I don't want to make testing more complicated with added security layers. However, I see that some users like to use it in a production environment. In that case, it is better to add the fixes above as additional features, as long as they don't compromise the original simplicity of adding users. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Forced TLS, Environment Variable Support, and Inj…ection Protection
XRDP_USERS)ps auxmakes these arguments visible to any user on the host. Furthermore,docker psstoresthem in the container's metadata indefinitely.
XRDP_USERS="user:pass:yes".list of the host. This prevents "neighbor" users on a shared development server or CI/CD
runner from sniffing plaintext passwords.
--and Quoting)useradd $1allowed "Flag Injection." An attacker could providea username like
-o -u 0 root2. The shell expands this touseradd -o -u 0 root2, whichcreates a second root user with full administrative privileges.
useradd -- "$username"and strict quoting of all shell variables.--separator tells the system that everything following it is apositional argument (a name), not a command flag. This eliminates a critical "Zero-to-Root"
privilege escalation vulnerability in the entrypoint logic.
security_layer=tls)negotiatemode allowed for "Downgrade Attacks."An active adversary on the network could intercept the RDP handshake and force it into
an unencrypted RDP security layer, allowing them to sniff the session content and credentials.
security_layer=tlsin xrdp.ini.negotiateand rdp modes, we ensure that an insecure connection will be rejected rather than
allowed, protecting the user's data confidentiality.
would either fail or fallback to insecure modes. Managing these certs manually is a friction
point that often leads users to disable security entirely.
opensslin thestartup scripts.
mounted, we provide "Security without Friction." The user gets an encrypted session
immediately without needing to understand certificate management.
The Ubuntu image was relying on system defaults, which were less hardened than our custom
xrdp.ini.
openssl)across all Dockerfiles.
a user pulls, the same audited security controls are in place, minimizing the "attack
surface" across the entire repository.
Every software shuld be safe software :)