πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.admin.peering
Article #3771

[addendum] Re: Is Rocksolid Light really compromised and insecure?

#3771
From: Soul Patch
Date: Tue, 02 Sep 2025 21:37
125 lines
6148 bytes
On Tue, 2 Sep 2025 16:26:04 -0500
Soul Patch <soul.patch@127.0.0.1> wrote:

> On Sat, 12 Jul 2025 19:41:55 -0000 (UTC)
> Ray Banana <rayban@raybanana.net> wrote:
> 
> > * Marco Moock wrote:
> > > On 12.07.2025 10:21 Uhr Anonymous wrote:
> > >  
> > >> Some have claimed that Rocksolid Light is insecure. They have claimed
> > >> that there are many vulnerabilities in the codebase. They have
> > >> claimed that Rocksolid Light should not be used or peered.
> > >> 
> > >> Yet I have not seen a single supposed vulnerability demonstrated.
> > >> 
> > >> I have not seen any CVE filings.
> > >> 
> > >> Can anyone demonstrate and prove any of the claimed exploits?  
> > >
> > > It least older versions were vulnerable to SQL injections that made
> > > creating files in the spool directory possible. The files.php file also
> > > seems vulnerable to such attacks.  
> > 
> > That would explain how the "haxxor" was able to grab account data for
> > a technical account for i2pn2.org (presumably the account used for the 
> > communication between the rslight frontend and the i2pn2 backend server). 
> > 
> > 
> > 
> > To make things even worse, there is nobody who is able to revoke 
> > the compromised account or change its password.
> > 
> > -- 
> > ΠŸΡƒΜΡ‚Ρ–Π½ β€” хуйло́
> > https://www.eternal-september.org
> 
> I am poking around the Rocksolid Light codebase. It would take a sizeable amount of work to fix some of the problems, but it is not insurmountable or gargantuan in scope, although there would be some tedium. It looks like the insecurities can be fixed if some of the attack vectors are gutted:
> 
> * remove the file upload and storage feature except for MIME attachments
> 
> * remove code for sqlite spool and force reversion to tradspool
> 
> * replace all sqlite functions with plain text parsing functions with santizers
> 
> * replace sqlite overview data with plaintext data store
> 
> * sanitize / validate web form inputs on the server side before any data is processed
> 
> * reject and don't process articles or control messages with badchars or invalid utf-8
> 
> * sanitize / validate nntp session commands more thoroughly
> 
> * validate and santize BBS mail messages before passing them to further functions or to inboxes.
> 
> * replace php pctnl functions with lower-privileged workarounds
> 
> * add code to validate and sanitize badchars from being passed to logs, spamassassin, mail server
> 
> * sandbox unencrypted nntp port 119 to localhost, forcing bigworld to use TLS in nntp-ssl.php
> 
> * going forward commit to zero use of third-party sql / sqlite libraries, and instead create custom functions using PHP native code, relying on tradspool and text files the old Unix way. A properly organized file tree will work as well as a database, with less overhead, just requiring more code, and the main tradeoff is more complex processing versus simple database commands
> 
> * going forward commit to a prefix-sorted tradspool tree instead of database message storage
> 
> *  have tested Rocksolid Light 'as is' for hundreds of newsgroups and it has managed to perform well so far, and since this application is not meant for serving tens of thousands of newsgroups these changes should have negligible impact on performance efficiency
> 
> * after fixing the vulnerability vector bugs, begin stress testing by increasing the number of newsgroups and connected users pulling article data and benchmarking until performance upper limits are hit, then identify the bottle necks and optimize from there
> 
> What am I missing so far?
> 

Addendum:

* configure all scripts and PHP files to prohibit any invocation as root user by checking to SUID / RUID at beginning of every script

* prohibit running install scripts as root user, except to request root for registering init / systemd service for the sync job / cron job

* add a script to automatically check file permissions, report discrepancies, and correct wrong permissions automatically

* bundle with firejail / jailkit / lxd / chroot options including network shaping in the jail

* bundle with inotify watch helpers to detect, report, and quarantine stray files or changed script files

* bundle with optional Linux MAC options that can be set in a text config file

* force install to a single user-owned directory either in /opt or $WEBROOT with .htaccess protections, instead of /etc /var or /run

* slowly work on converting the shell installation scripts to pure PHP for a word-press like install from the web front end

* assign IDs and access controls to the individual PHP functions, limiting their inputs and outputs on a per file basis
Technical Details
Message-ID: <1097o03$2h3qd$2@paganini.bofh.team>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.pugleaf.net!ygg-srl.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!paganini.bofh.team!tor-network!not-for-mail
References: <104tuhe$2r60t$1@paganini.bofh.team> <20250712205507.6a4eda98@ryz.dorfdsl.de> <slrn1075ek3.2ag38.rayban@raybanana.net> <1097nak$2h3qd$1@paganini.bofh.team>

Show Full Headers
Complete Article Headers
Message-ID: <1097o03$2h3qd$2@paganini.bofh.team>
Subject: [addendum] Re: Is Rocksolid Light really compromised and insecure?
Date: Tue, 2 Sep 2025 16:37:31 -0500
From: Soul Patch <soul.patch@127.0.0.1>
References: <104tuhe$2r60t$1@paganini.bofh.team> <20250712205507.6a4eda98@ryz.dorfdsl.de> <slrn1075ek3.2ag38.rayban@raybanana.net> <1097nak$2h3qd$1@paganini.bofh.team>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.pugleaf.net!ygg-srl.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!paganini.bofh.team!tor-network!not-for-mail
Newsgroups: news.admin.peering
Organization: To protect and to server
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Date: Tue, 2 Sep 2025 21:36:03 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="2658125"; posting-host="GmctADGZKhUEXUM2YIi4gw.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
X-Notice: Filtered by postfilter v. 0.9.3
X-TOR-Router: sha256:MTg1LjIyMC4xMDEuMzc= --