Tuesday, 2010-01-05

../irclogs/#mantishelp.2010-01-05.log
--- scribe started ---00:00
CIA-27Mantisbt: hickseydr * r45771c634045 /bug_file_add.php: Fix #11326: Don't show form security token error for oversized uploads08:46
CIA-27Mantisbt: hickseydr master-1.2.x * r67762d7e93d7 /bug_file_add.php: Fix #11326: Don't show form security token error for oversized uploads08:46
CIA-27Mantisbt: hickseydr * rb50a52a4963c / (3 files in 2 dirs): Issue #11291: Add X-Sendfile support for high performance file downloads08:46
paul_____yay for more config entries :)09:01
dhx_mmore and more :)09:14
dhx_mbtw what web server do you run?09:14
dhx_mI'd love to get some feedback on X-Sendfile :)09:14
dhx_mI've only tested with Lighttpd 1.4.x so far09:14
dhx_malso are large attachments working OK for you (when stored on the disk)?09:15
dhx_mI think a lot of people may be confused with the VERY buggy attachment handling pre-RC209:16
dhx_mand even post-RC209:16
dhx_ma lot of things have been fixed since then09:16
dhx_mdoh those should be global options09:21
dhx_moh _file covers it :)09:22
dhx_mmaybe09:22
dhx_mgrrr10:30
dhx_mwhy does the order of $g_global_settings matter so much... when I reorder it I get Fatal error: Call to undefined function auth_is_user_authenticated() in /var/www/localhost/htdocs/mantis-git/core/config_api.php  on line 8410:30
dhx_moh config_api depends upon auth_api10:38
dhx_mand at that point, auth_api hasn't been loaded yet10:38
dhx_mpaul_____: what exactly was the reasoning for removing the require_once() calls from the head of each API file?10:38
dhx_mpaul_____: oops my bad, all you did was remove absolute paths :)10:39
paul_____dhx_m: IIS11:21
dhx_mI'm not so sure I like requiring everything in core.php11:21
dhx_mrather than placing those calls in the individual files using each API11:22
paul_____well11:22
paul_____as we implement classes, should be less of an issue11:22
dhx_myep11:22
paul_____atm, having it in core api is fine11:22
paul_____(as most of our apis are so interlinked)11:23
dhx_mdo we have an up-to-date doxygen site?11:23
paul_____of source code?11:23
dhx_mwell it'd be nice if we had a way to keep track of coupling between different APIs11:23
paul_____that's easy11:23
paul_____draw a grid of each api11:23
paul_____erm11:24
paul_____sorry, draw a box containing each api file11:24
paul_____draw a line between each box11:24
dhx_mautomatically? :p11:24
dhx_mand not assuming that every box is connected maximally to every other box :p11:24
paul_____anyway, atm we have too much coupling11:28
dhx_mit's hard not to though11:29
dhx_meverything uses config_api, user_api and the other common things11:29
dhx_meven though you may want to be using user_api separately without any notion of config_api11:29
dhx_mI guess it can be worked out by constructors passing in most of the options, or whatever11:32
paul_____in terms of the config commit for thingie11:35
paul_____erm11:35
paul_____x-sendfile11:35
paul_____tbh, i'd probably have rather seen a turn on/off switch11:35
paul_____and us to add supported webservers based on SERVER API11:36
paul_____(or if it's functionality enabled by default (in lighttpd), just use it11:36
dhx_mit often requires a user to configure their web server to specify which directories can use X-Sendfile11:38
dhx_mI was thinking of the approach you mentioned11:38
dhx_mbut thought it was a little complex at the moment for what we'd be using it for11:38
mantisbt_96789test12:51
setuidut oh12:55
setuid67.78.13.254 bugs.gnu-designs.com - - [05/Jan/2010:05:53:42 -0500] "GET /manage_proj_page.php?sort=']);}error_reporting(0);print(_code_);passthru(base64_decode($_SERVER[HTTP_CMD]));die;%23 HTTP/1.0" 200 3649 "-" "-"12:55
setuidRooted using a hole in Mantis twice in 2 weeks12:55
setuidJust found it12:56
dhx_msetuid: please upgrade, it was fixed in v1.1.4 of MantisBT (a long time ago) according to http://secunia.com/advisories/32314/2/12:59
dhx_malso see http://www.mantisbt.org/bugs/view.php?id=970413:00
setuidThis is what they ran on our server, using that hole: http://pastebin.com/d670f57d713:02
dhx_myou must be using old software everywhere if you got rooted like that13:03
setuidNope, everything is current... except apparently MAntis13:04
dhx_mah so they didn't root your server then?13:04
setuidSure did13:04
dhx_mas in, uid=0 root?13:05
setuidThey rooted it last week and again this morning.13:05
setuidLook at the output at that pastebin13:05
dhx_mit doesn't mean that it worked13:05
setuidOdd thing is, www-data has no valid shell (it's /bin/false), and a /var/www/.bash_history was created, containing those commands.13:05
dhx_mmost "hacks" will be automatically scripted so it doesn't (and often can't) verify the response of previous commands13:05
setuidThey exposed the root mysql password, in the original output...13:06
setuidYes, I don't "know" if it worked, I'm trying to fiure that out now13:06
setuidBut Debian doesn't checksum their files, so I can't verify current checksum against the ones packaged in the original .debs13:06
dhx_moh yeah, most people don't treat their root mysql password with enough care :(13:06
setuidI have backups and backups of my backups, on a daily and hourly basis, so rolling back any data that may have been modified should be easy, except the OS itself13:07
dhx_malthough.... MySQL should be running as mysql:mysql with limited permissions...13:07
dhx_mif I were you, I'd be more concerned about how they managed to get root13:07
dhx_mfrom a remote PHP execution bug13:08
dhx_mohhh13:08
dhx_mit looks like you share a common MySQL and server root password?13:08
dhx_mvery bad idea if that's the case13:09
setuidDefault debian setup, unfortunately, but one I will be fixing13:09
dhx_mDebian does that by default? :o13:10
setuidBack shortly, have to see my daughter at school13:10
dhx_mok, hope you can sort things out :)13:10
paul_____that's the in_array bug?13:10
dhx_mmulti_sort function... and how it uses create_function()13:12
dhx_m$t_function = create_function( '$a, $b', "return $t_factor * strnatcasecmp( \$a['" . $p_key . "'], \$b['" . $p_key . "'] );" );13:12
dhx_mwhere $p_key is a user supplied string13:12
dhx_msurely there has to be a better way?13:12
paul_____dunno, the fixed version is safe though I believe13:13
dhx_mit checks the user supplied input to see if $p_key already exists13:13
dhx_mstill, the function is absolutely horrible from my POV13:14
dhx_mit assumes that the existing keys are safe and haven't been tampered with13:15
dhx_mso it becomes possible for someone to go from a relatively "meh" SQL injection attack13:15
dhx_mto remote PHP code execution (quite a lot more severe)13:15
paul_____iirc, we fixed that13:16
dhx_mjust inject bad project names13:16
paul_____to check13:16
dhx_moh well I'm off for now, cya later :)13:19
setuidOk, anyone about?14:11
setuidI'm back... and trying to figure this out.14:11
setuidwww-data, without a valid shell, was exploited through Mantis, to gain root and run commands14:12
setuidThe question really is... was their attempt successful?14:12
paul_____setuid: what version of mantis was you actually on?15:26
setuidI upgraded it, is there a way to check? I have backups.15:34
paul_____constant_inc.php15:36
paul_____but tbh, for someone to get root15:38
paul_____from a php script15:38
paul_____you'd need some other insecurity/misconfiguration15:38
paul_____i'd have thought15:38
paul_____i.e. if you can run commands as 'www-data', you can run an app, delete files owned by www-data etc, but unless you can view/run some root exploit, your not going to 'get root privs'15:39
paul_____for example,if you allow anyone to su root without a password for example15:40
TTimohello15:53
TTimowe are using a fairly outdated release of mantis, and I am looking at the feature set in the latest release digging for some features that we might want to use15:55
TTimomost notably, we would like to be able to establish timelines, that is give either a duration or a deadline (e.g. fixed date) to a task, and be able to map that out onto a calendar using the dependencies hierarchy15:56
TTimois that something mantis can do, or do you know addons or even unrelated software that can ?15:57
setuidpaul_____, I don't see any verison info in core/constant_inc.php15:59
TTimoanyone16:09
TTimoI suppose that hitting the DB schema myself I could feed that to a third party tool16:44
kirillkapaul_____: around?17:14
TTimoanother thing, can I easily do something like 'go through bugs flagged as immediate for a list of developers, and email a reminder if they haven't been updated in more than 2 business days'17:21
kirillkaTTimo: whats verson?17:25
kirillkaversion*17:25
TTimowell some old 1.0 atm, but thats fine I just need to understand how feasible that is, we can migrate up17:25
kirillkapaul_____: I think need create captcha for send post... Too more spam in forum, and I can delete this17:25
kirillkaFor 1.x.x see plugin reminder17:26
TTimois there a list of plugins17:26
TTimoI was looking for that17:26
kirillkahttp://deboutv.free.fr/mantis/17:26
kirillkahttp://deboutv.free.fr/mantis/plugin.php?plugin=Reminder17:26
TTimointeresting .. is there anything to manage implementation timelines / milestones / gantt charts in there ?17:27
TTimowhy is there no plugin list on the main site, does this one gather all there is17:38
g0rd0nis it possible to merge two users in mantis?18:11
moto-moig0rd0n: Not with mantis self, but with the right queries it would be possible18:15
g0rd0n:(19:06
setuidanyone about?20:12
setuidI'm developing a query to purge users who have a.) created an account, b.) logged in at least once, and c.) never created a bug or bugnote20:15
setuidLooks like this: DELETE FROM u USING mantis_user_table u LEFT JOIN mantis_bug_table b ON u.id = b.reporter_id LEFT JOIN mantis_bugnote_table c on u.id = c.reporter_id WHERE b.reporter_id IS NULL AND c.reporter_id IS NULL AND u.last_visit LIKE '%2009%';20:15
* paul_____ sighs23:06
paul_____reinstalling windows takes ages23:06

Generated by irclog2html.py