Exploit databaseDownload repository ZIP
GH-129b6d8e8968bf87839badc4b3aed0ef
kr0n-security/cve-2023-3519
Sources for CVE-2023-3519
15 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files4
kr0n-security/cve-2023-3519Revision 7708255fe50e
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
NetScalerScan/Program.cs
C# · 3,761 bytes// Strings
string target = "https://127.0.0.1/";
string userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537";
try
{
using (var httpClientHandler = new HttpClientHandler())
{
// Bypass certificate validation
httpClientHandler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => { return true; };
using (var httpClient = new HttpClient(httpClientHandler))
{
// Set the user-agent
httpClient.DefaultRequestHeaders.UserAgent.ParseAdd(userAgent);
// Make the HTTP request
HttpResponseMessage response = await httpClient.GetAsync(target);
// Check if the request was successful
if (response.IsSuccessStatusCode)
{
string content = await response.Content.ReadAsStringAsync();
// Check if the word "citrix" is present in the response content
if (content.IndexOf("citrix", StringComparison.OrdinalIgnoreCase) >= 0)
{
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("CITRIX FOUND");
Console.ResetColor();
// Get the Last-Modified date from the response headers
if (response.Headers.TryGetValues("Last-Modified", out var lastModifiedValues))
{
string lastModified = lastModifiedValues.GetEnumerator().Current;
Console.WriteLine("Last-Modified Date: " + lastModified);
// Convert the Last-Modified date to DateTime
if (DateTime.TryParse(lastModified, out DateTime lastModifiedDate))
{
// Calculate the age
TimeSpan age = DateTime.Now - lastModifiedDate;
int daysDifference = age.Days;
Console.WriteLine($"Age: {daysDifference} days");
// Check if the server might be okay or too old
if (daysDifference >= 0 && daysDifference <= 15)
{
Console.WriteLine("MIGHT BE OK!");
}
else
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("DANGER OLD DATESTAMP DETECTED");
Console.ResetColor();
}
Console.ResetColor();
}
else
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Error enumerating Last-Modified header");
Console.ResetColor();
}
}
else
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("NOT a CITRIX Server");
Console.ResetColor();
}
}
else
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("HTTP Request Error: " + response.StatusCode);
Console.ResetColor();
}
}
}
}
}
catch (Exception ex)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Error: " + ex.Message);
Console.ResetColor();
}