Jump to content




How to make a brute forcer [?]


16 replies to this topic

#1 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 11 September 2012 - 03:38 AM

Hello everyone, I'm trying to make a rednet password hacker but I can't find out how to brute force. Does anyone know how? (I know 1 way but it will take forever)

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,458 posts

Posted 11 September 2012 - 04:05 AM

Brute forcing does take forever. You start at 0, work your way up through every entry in a range.

#3 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 11 September 2012 - 04:21 AM

View PostLyqyd, on 11 September 2012 - 04:05 AM, said:

Brute forcing does take forever. You start at 0, work your way up through every entry in a range.

Is there a api to convert the number to a letter?

Like this:
value = 1
while true do
  value = value+1
  rednet.send(serverID, toWord(value)
  id, message = rednet.receive()
  if message == "login_success" then
    print("Complete!")
    print(tWords(value))
    error()
  end
end


#4 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,458 posts

Posted 11 September 2012 - 04:48 AM

The string manipulation functions may have what you're looking for. I can't recall. Worst case scenario, just make a list of all the characters and a function to iterate through the possibilities.

#5 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 11 September 2012 - 06:09 AM

lol, cool idea. I'm going to have to make one of these now :D/>

#6 hego555

  • Members
  • 89 posts

Posted 11 September 2012 - 06:25 AM

I bet LUA has a command to convert key to numerical value... most languages do, if you find it please inform me... great idea BTW

#7 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 12 September 2012 - 10:44 AM

Here is my basic prototype, you would send the keycode instead but I was just testing

local id=1
local password='bbc'
chars={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' '}
--chars={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',',','.','/',';',''','[',']','-','=','','<','>','?',':','"','{','}','_','+','`','~','1','2','3','4','5','6','7','8','9','0','!','@','#','$','%','^','&','*','(',')',' '}
function cyclechar(current)
local tChars={}
for i=1,#current do
  tChars[#tChars+1]=string.sub(current,i,i)
end
--for k,v in pairs(tChars) do print(v) end
local at=#tChars+1
local returned=nil
local looping=1
while looping==1 do
  at=at-1
  if at==0 then
   returned='a'
   break
  end
  for k,v in pairs(chars) do
   if tChars[at]==v and k~=#chars then
    tChars[at]=chars[k+1]
    looping=0
    break
   elseif tChars[at]==v and k==#chars then
    tChars[at]=chars[1]
   end
  end
end
local returned=returned or ''
for k,v in pairs(tChars) do
  returned=returned..v
end
return returned
end
local keycode='a'
while true do
term.clear()
term.setCursorPos(1,1)
print(keycode)
if keycode==password then
  print('found password: '..keycode)
  while true do sleep(10) end
end
keycode=cyclechar(keycode)
sleep(0)
end


#8 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 14 September 2012 - 02:36 AM

View PostKaoS, on 12 September 2012 - 10:44 AM, said:

Here is my basic prototype, you would send the keycode instead but I was just testing

local id=1
local password='bbc'
chars={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' '}
--chars={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',',','.','/',';',''','[',']','-','=','','<','>','?',':','"','{','}','_','+','`','~','1','2','3','4','5','6','7','8','9','0','!','@','#','$','%','^','&','*','(',')',' '}
function cyclechar(current)
local tChars={}
for i=1,#current do
  tChars[#tChars+1]=string.sub(current,i,i)
end
--for k,v in pairs(tChars) do print(v) end
local at=#tChars+1
local returned=nil
local looping=1
while looping==1 do
  at=at-1
  if at==0 then
   returned='a'
   break
  end
  for k,v in pairs(chars) do
   if tChars[at]==v and k~=#chars then
	tChars[at]=chars[k+1]
	looping=0
	break
   elseif tChars[at]==v and k==#chars then
	tChars[at]=chars[1]
   end
  end
end
local returned=returned or ''
for k,v in pairs(tChars) do
  returned=returned..v
end
return returned
end
local keycode='a'
while true do
term.clear()
term.setCursorPos(1,1)
print(keycode)
if keycode==password then
  print('found password: '..keycode)
  while true do sleep(10) end
end
keycode=cyclechar(keycode)
sleep(0)
end

Thanks, this worked! :)/>

#9 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 14 September 2012 - 06:01 AM

no problem, you also need to add capital letters to the table in case they use those. There is a problem though, you can easily protect your system from this, initially I thought to just make my password/keyword accepting PC wait a second after it received incorrect input but I realised that it would cause issues in a high traffic system. all you do is make your PC wait for 2 separate messages one after the other, the brute forcer would not get this right

#10 hego555

  • Members
  • 89 posts

Posted 15 September 2012 - 06:56 AM

I make my computers check the ID that sent the request, so it can validate it!

#11 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 15 September 2012 - 07:38 AM

That is another method but it is tiresome to constantly be looking up ids and adding them to your code

#12 hego555

  • Members
  • 89 posts

Posted 16 September 2012 - 07:03 AM

I agree, but its full proof!

Unless you code your own OS and add a ID spoofer.. haha!

#13 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 16 September 2012 - 07:40 AM

haha, I love it when people think their system is unbreakable, all I do is get a computer looping at max speed broadcasting 'aa' and a second one as well to be sure, a spam bot if you like, illegal on most server but still effective on almost any system. disk hacking is also an option, take over their PC and use its ID to pirate the others :)/>

#14 hego555

  • Members
  • 89 posts

Posted 16 September 2012 - 08:44 AM

You mean your going to DDoS the computer?

#15 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 16 September 2012 - 09:15 AM

Yep, gotta be careful though or you may get banned from servers, only do it on PvP and servers that allow hacking

#16 goldiekruger

  • New Members
  • 1 posts
  • LocationMalta

Posted 16 September 2012 - 12:59 PM

Tanks for sharing, KaoS.

#17 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 16 September 2012 - 03:11 PM

View Postgoldiekruger, on 16 September 2012 - 12:59 PM, said:

Tanks for sharing, KaoS.

Thanks :)/> always great to know it helps





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users