Members: 16,996
Threads: 38,846
Posts: 159,391
Online: 23

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse

Go Back   Mambers.com > Archive > Mambo 4.5 > Mambo 4.5 Security

 
 
LinkBack Thread Tools Display Modes
Old 03.12.2004, 19:15   #1 (permalink)
Junior Mamber
 
Join Date: Nov 2004
Posts: 27
active6 is on a distinguished road
Default Component/Module/Bot code checker initiative

The thing that started this ball rolling: a screwup on my behalf in a component I released where I forgot to remove some install check code that sent me a confirmation e-mail after installation.

Meanwhile, several other component authors have reacted on the Mambers forum that they too have been using the same confirmation approach for install checks in development and sometimes release phases, and my components have been cleared by independent sources such as ParkWeb Oracle, MyPMS and I've also received constructive messages from a member of the Mambo Development team.


The issue has identified a vulnerability in Mambo
Yesterday I wrote an article on recommended practices before installing a Mambo component to a live site (see my site or the thread), and today I'd like to extend that into a suggestion for a Component/Module/Bot code checker initiative

Yesterday, a discussion evolved on Mambers on how this problem could best be treated at the root: in mambo itself. I'm afraid that as I see it, there is no quick fix for a 100% secure install checker, but I think we can get close.

Practically everyone in the forum agreed that a central component download repository with code review before publishing would actually be the next best thing. But I guess everyone can more or less imagine how much work (not to mention responsibility) that would put on the shoulders of the Mambo repository site administrators.

So I've got an additional suggestion, that could actually be turned into a component or a callable function that can be integrated into the Mambo Core code, or up/download components like remository:

1) a unique ID, combined with a CRC check of the file is indeed undispensable for identifying components and versions in the install XML file. It's just too easy to change the other information in the XML file.

2) A scanning function (callable in a dedicated component, com_install or components like Remository) that checks for:

-Things that must be in a component's code, like valid or die, and a check wether it's not just a commented line or string value, and a "risk level" for each entry if it's missing

-Things that shouldn't be in a component's code, like mosConfig_Password, config.php, and a "risk level" for each entry if it's present

-I also initally thought of things that may indicate malicious code, such as eval() to hide cut-up commands so they wouldn't show up in a regular text search, but I've been informed that you can actually scan pre-processor output PHP code, so that would eliminate this kind of coverup.

Based on the scanning function, a report should be generated with the line numbers of "risk code", that may actually in the case of mail() etc. be completely justified, and a way for the code reviewer to "OK" those justified items in the report, so a realistic risk value can be assigned to every component (and every version).

The repository of all collected "rules and risks" is probably best put in an XML file, with GUIDs for all items, so code can always be scanned against the most recent version of the code rules. This rules files must be retrieved from trusted sites, ideally MamboForge or MamboServer...in short, the equivalent of the approach virus scanners use, but not in proprietary format.

I want to work this out further into table structures and basic code, but I would suggest that the first thing to do would be to compile a list of must-haves, can't-haves and watch-its. I'll submit my list in this thread once I've given this some more thought, and think about table and XML structures.

I'll submit all code and ideas for review here first.

Last edited by active6; 03.12.2004 at 23:41.
active6 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Old 04.12.2004, 03:39   #2 (permalink)
Mamber
 
Join Date: Jul 2004
Posts: 57
sacr0 is on a distinguished road
Default Re: Component/Module/Bot code checker initiative

Well done active6. Very much looking forward to this
__________________
Imagination seeds the focus of reality
sacr0 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 04.12.2004, 09:39   #3 (permalink)
Junior Mamber
 
jascha's Avatar
 
Join Date: Apr 2004
Posts: 26
jascha is on a distinguished road
Default Re: Component/Module/Bot code checker initiative

Yes, seems like a good evolution in terms of ideas we had covered a very long time ago on Mambers and the MamboServer forums. I will type up some imput and ideas over the weekend once I let it simmer a bit.
__________________
Mambo Security: http://mambosec.localareasecurity.com
jascha is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 04.12.2004, 16:54   #4 (permalink)
Senior Mamber
 
mambovince's Avatar
 
Join Date: Apr 2004
Location: London, UK
Posts: 165
mambovince is on a distinguished road
Default Re: Component/Module/Bot code checker initiative

Well done!
I admire the way you have handled yourself with this 'crisis', creating a positive learning experience from it, and because you didn't give up and become rude or offensive - unlike many others in similar situations.

I see this whole event as a good example of excellent public relations.

Please keep up the good work for all those that appreciate it.

Vince
__________________

HostBaron.com
- low price Mambo & Joomla starter packages.
Includes easy install or migrate from Mambo to Joomla!
mambovince is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 04.12.2004, 17:19   #5 (permalink)
Senior Mamber
 
robbie's Avatar
 
Join Date: Apr 2004
Location: 's Gravenpolder, Netherlands
Posts: 146
robbie is on a distinguished road
Send a message via ICQ to robbie Send a message via MSN to robbie
Default Re: Component/Module/Bot code checker initiative

that's a real good idea .. As mambovince said, some people are getting rude etc and you tried to make a learning piece of it
__________________
Proud webmaster of http://www.textbased.net
Dutchmambo.nl
robbie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 06.02.2005, 06:53   #6 (permalink)
Baby Mamber
 
Join Date: Feb 2005
Posts: 1
ajaksu is on a distinguished road
Search Re: Component/Module/Bot code checker initiative

Hi all,
I'm new here but I'm very interested in this subject. In fact, I'm trying to adapt Flawfinder to work with PHP. Problem is: I know almost nothing about PHP security . If there's any development on the OP ideas, I could work to make a stand-alone scanner for given sets of rules... and if you know that function X should be considered bad due to Y, post X and Y here and I'll try to put it in
ajaksu is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert to Mambo Code zonemen Component 'How Do I' Questions 9 29.07.2005 19:37
Why Html editors destroys the code? winini Mambo 4.5.1 Installation and Upgrades 2 22.10.2004 00:00
php code to tell me what main menu i am in?? mattymattmatt Mambo 4.5 'How Do I' Questions 3 22.09.2004 14:26
Open Letter to Community spignataro Mambo 4.5 General Talk 0 15.09.2004 04:57
mod_login.php hack to integrate w/ htaccess - please review my code Blorf Development Discussions 6 30.08.2004 13:41


All times are GMT +2. The time now is 02:40.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.