Monday, October 3, 2016

Script Kiddie Network Mapper/Profiler

Here's a simple python script to quickly port scan a network (All TCP, default UDP via NMAP) and then Nikto scan common webserver ports (80, 443)

Written as a quick/rough tool for automation of simple "script kiddie" tasks.

Just the basics for now. System for scanning is passed as an argument. Can be individual or in CIDR notation.

Run this with correct arguments, grab a cup of coffee and come back in a few minutes.

#
#
#
#
#
# CODE STARTS HERE
import sys, os, platform
from netaddr import *

ip = IPNetwork(sys.argv[1])

# Quick Network Mapping Tool
#This will scan the target host without a ping, full TCP scan, all ports
def nmapfull(host):

    # NMAP Command
    nmap_str = "-sV -O -p 1-65535 -Pn"
    # NMAP
    return os.system("nmap" + " " + nmap_str + " " + str(ip))

#This will scan the target, with a ping, quick UDP scan
def nmapudp(host):


    # NMAP Command
    nmap_str = "-sU -O"

    # NMAP
    return os.system("nmap" + " " + nmap_str + " " + str(ip))

#This will nikto the host on port 80 (default http)
def nikto(host):

    # NIKTO Command
    nikto_str = "-h " + str(ip) + " -p" + " 80"

    # RUN NIKTO
    return os.system("nikto" + " " + nikto_str + " " + str(ip))

#This will nikto the host on port 443 (default https)
def niktossl(host):

    # NIKTO Command
    nikto_str = "-h " + str(ip) + " -p" + " 443"

    # RUN NIKTO
    return os.system("nikto" + " " + nikto_str + " " + str(ip))


for ip in IPSet([ip]):
      print(ip)
      print ("IP "  + str(ip) + " Results for FULL nmap")
      nmapfull(ip)
      print ("IP "  + str(ip) + " Results for UDP nmap")
      nmapudp(ip)
      print ("IP "  + str(ip) + " Results for port 80 nikto")
      nikto(ip)
      print ("IP " + str(ip) + " has been nikto scanned.")
      print ("IP " + str(ip) + " Results for port 443 nikto")
      niktossl(ip)
      print ("IP " + str(ip) + " has been nikto SSL scanned.")



Friday, February 26, 2016

CVE Candidate - Privilege Escalation in Compusource Real Time Home Banking

# Exploit Title: CompuSource Systems - Real Time Home Banking - Local Privilege Escalation/Arbitrary Code Execution
# Date: 2/25/16
# Exploit Author: singularitysec@gmail.com
# Vendor Homepage: https://www.css4cu.com
# Version: CompuSource Systems - Real Time Home Banking
# Tested on: Windows 7
# CVE : TBD

Note: Windows Server 2003/2008/2012  *may* be vulnerable, depending on system configuration.

This vulnerability has been reference checked against multiple installs. This configuration was identical across all systems tested.
Executables/Services:
%SystemRoot%/css50/csdir/RealTimeHomeBankingSvc.exe
HomeBankingService
Attack Detail:
The application installs with LOCAL SYSTEM service credentials in the directory %SystemRoot%/css50/csdir

Inline image 1

Inline image 2


The executables that are installed, by default, allow AUTHENTICATED USERS to modify, replace or alter the file. This would allow an attacker to inject their code or replace the executable and have it run in the context of the system.
Inline image 3

This would allow complete compromise of a machine on which it was installed, giving the process LOCAL SYSTEM access to the machine in question. An attacker can replace the file or append code to the executable, reboot the system or restart the service and it would then  compromise the machine. As LOCAL SYSTEM is the highest privilege level on a machine, this allows total control and access to all parts of the system.

Remediation:
Remove the modify/write permissions on the executables to allow only privileged users to alter the files.
Apply vendor patch when distributed.
Vulnerability Discovered: 2/25/16
Vendor Notified: 2/25/16
                                                                                         
Website: www.information-paradox.net
This vulnerability was discovered by singularitysec@gmail.com. Please credit the author in all references to this exploit.