Re: [Help] Brute Force



Jeff Mullen <413@xxxxxxx> wrote:

>Daemon wrote:
>> Hello,
>>
>> I am trying to create a script that will create a loop threw ascii
>> characters 32 - 126, but be limited to the number in a varible,
>> controlling how many returns. I figgured a control of how many array
>> keys would be a good spot, say I only want strings that start with 3
>> characters and end at 5 charcters.
>>
>> And I wanted to use an array for all possible ascii characters. So far,
>> the code I have is a bit of a mess and was hoping for some one that has
>> more knowledge in php to lead me in the right direction to how to
>> accomplish my task at hand.
>>
>> <?php
>> $ascii_chr_range = array('0' => '32', '1' => '33', '2' => '34', '3' =>
>> '35', '4' => '36', '5' => '37', '6' => '38', '7' => '39', '8' => '40',
>> '9' => '41', '10' => '42', '11' => '43', '12' => '44', '13' => '45',
>> '14' => '46', '15' => '47', '16' => '48', '17' => '49', '18' => '50',
>> '19' => '51', '20' => '52', '21' => '53', '22' => '54', '23' => '55',
>> '24' => '56', '25' => '57', '26' => '58', '27' => '59', '28' => '60',
>> '29' => '61', '30' => '62', '31' => '63', '32' => '64', '33' => '65',
>> '34' => '66', '35' => '67', '36' => '68', '37' => '69', '38' => '70',
>> '39' => '71', '40' => '72', '41' => '73', '42' => '74', '43' => '75',
>> '44' => '76', '45' => '77', '46' => '78', '47' => '79', '48' => '80',
>> '49' => '81', '50' => '82', '51' => '83', '52' => '84', '53' => '85',
>> '54' => '86', '55' => '87', '56' => '88', '57' => '89', '58' => '90',
>> '59' => '91', '60' => '92', '61' => '93', '62' => '94', '63' => '95',
>> '64' => '96', '65' => '97', '66' => '98', '67' => '99', '68' => '100',
>> '69' => '101', '70' => '102', '71' => '103', '72' => '104', '73' =>
>> '105', '74' => '106', '75' => '107', '76' => '108', '77' => '109', '78'
>> => '110', '79' => '111', '80' => '112', '81' => '113', '82' => '114',
>> '83' => '115', '84' => '116', '85' => '117', '86' => '118', '87' =>
>> '119', '88' => '120', '89' => '121', '90' => '122', '91' => '123', '92'
>> => '124', '93' => '125', '94' => '126');
>>
>> $gen_string = array();
>> $gen_string_max = '2';
>>
>> array_flip($ascii_chr_range);
>> settype($gen_string, "string");
>> while (count($gen_string) <= $gen_string_max) {
>> for ($i = $ascii_chr_range['0']; $i <= end($ascii_chr_range); $i++) {
>> echo chr($i) . ' corrisponds with ASCII value ' . $i . '<br/>' . "\n";
>> echo "\t" . 'Comparing ' . $i . ' to ' . end($ascii_chr_range)
>> .'<br/>' . "\n";
>> if ($i == end($ascii_chr_range)) {
>> echo "\t" . 'Changing varible' . $gen_string[1] . ' to ' . $i .
>> '<br/>' . "\n";
>> $gen_string[1] = chr($gen_string{strlen($gen_string) - 1} + 1);
>> //$i = $ascii_chr_range['0'];
>> die();
>> }
>> else {
>> echo "\t" . 'Last Key in string $gen_string is ' . $i . '<br/>' .
>> "\n";
>> $gen_string[0] = chr($i);
>> }
>> }
>> print_r($gen_string);
>> }
>> ?>
>>
>> Again, it's proper, and this is my first attempt at a brute force, but I
>> believe its plossible.
>>
>> Basically, create a loop determined by comparing the $gen_string_max to
>> the number of $gen_string array keys. Then create a loop of pssobile
>> ascii values in the array, and limit the returns to the end. I figgure I
>> could reset the varible before the next roll over of the script. This I
>> believe is my fault in the script, as its possible it wont count the
>> last value in the array as a return, instead reset it as soon as its
>> found. I'm guessing there has to be other methods...
>>
>> I also wrote a script Canadian SINs which is posted at
>> http://hackcanada.com which is a form of brute forcing...
>>
>> Any help would be appreciated!!
>>
>> ~ Daemon
>
>I'll admit that I haven't thought very hard about this, so this
>post may be useless, but...here goes...
>
>Have you tried just using integer arythmatic? I mean, looking
>at your array, you take your index, add 32 and convert from an
>integer to a character and you have your value. No arrays
>necessary.
>
>Does that help any?
>
>Jeff

Why anyone would help someone who is trying to write a brute-force
password attack and is too dumb to figure out how to do it is beyond
me. Humans is wierd. <g>

--
http://www.ren-prod-inc.com/hug_soft/store.php?action=contact
.



Relevant Pages

  • Re: Logon script - function array and select case not working
    ... this all works well, except, the function i am using for the rules in the control script causes alot of querrys to AD. as there are alot of groups. ... objTSout.writeline retrv ... So if you think that this will assign an array value to the variable, how do you think the case select statement is going go compare this array value with the literal string values such as "group name here"? ... However, by not assigning ANY value to checkgrp in the function, you are guaranteeing that, should the function ever exit, it will return no information. ...
    (microsoft.public.scripting.vbscript)
  • Re: string retrieval issue
    ... Chicago Bears|NFC North ... not writing the third element back to the array). ... You didn't include it in your script. ... Fear is the mind-killer. ...
    (comp.lang.perl.misc)
  • Re: even rows for checkbox forms with no splitting of boxes from values
    ... 'mod' on the array length with a denominator equal to the width of the row, ... State saving really depends on what the script is already doing. ... So I usually roll my own checkboxes. ... #this is to create an array with 25-50 strings 2-10 in length ...
    (comp.infosystems.www.authoring.cgi)
  • Re: settimeout needs alert() ???
    ... function slider { ... and use script to replace the src and title attributes. ... are downloaded completely. ... The usual strategy is to load all of the images in to an array of image ...
    (comp.lang.javascript)
  • Re: BinaryStream.Write ByteArray erroring with Code 800A0BB9, Source ADODB.Stream
    ... script is reaching out to a SQLServer database and grabbing some data ... BinaryStream.Write method expects a byte array, ...     Else ... I made the changes to the script using your code, ...
    (microsoft.public.scripting.vbscript)