Grey Hack

Grey Hack

71 ratings
Basic exploits with scripting
By IZackI
This guide will explain what to do if you finished the tutorial mission and don't know what to do next.
7
   
Award
Favorite
Favorited
Unfavorite
Introduction
After updating the game with new 'exploit' mechanic old programs are gone from the game and you can't use programs that were available in tutorial.
As of creating this guide there are not any programs that allow you to scan and use exploits manually to get access to target. I created two simple but inefficient scripts that will help you understand what to do in this game. Scripts are with notes to better understand how they work.
Made for game version: 0.7.2633
Before start
Start a singleplayer game and get access to the Internet.
Create your mail and bank accounts.
Download 'nmap' and put in '/bin'.
Download 'decipher' and put in '/bin'.
Download 'metaxploit.so' and put in '/lib'.
Open Code Editor and compile those two scripts.
Code: Beginner Scanner
This script scans target machine for exploits:
//Beginner Scanner file: bscanner // <- this is a comment print("<b>-= Beginner Scanner 1.0 =-</b>") // this will print text on screen and <b> is for bold if params.len != 2 or params[0] == "-h" or params[0] == "--help" then exit("<b>Usage: bscanner [ip_address] [port]</b>\n<b>Description:</b>\nScript made to remote scan for exploits and showing all the results.\nby IZackI") // if this condition is true exit with message in quotes / params.len - check how many parameters for the script is provided / params[0] == "-h" - check if first parameter is equal the same as in quotes metaxploit = include_lib("/lib/metaxploit.so") // sets value for ver metaxploit an external library if not metaxploit then exit("<color=#ff0000>Error: Unable to find 'metaxploit.so'. Put missing library in the 'lib' folder.</color>") // if ver metaxploit is not present exits with red message in quotes address = params[0] // sets var address to parameter 0 port = params[1].to_int // sets var port to parameter 1 - var ports needs to be intiger net_session = metaxploit.net_use(address, port) // connects to provided IP address using metaxploit lib if not net_session then exit("<color=#ff0000>Error: Unable to connect.</color>") // if connection is not established prints red text and exits print("-- Scanning --") // this will print text on screen metaLib = net_session.dump_lib // this will set ver metaLib to get to the connected library scan = metaxploit.scan(metaLib) // scans a metaLib for vulnerable memory addresses and returns them in a list i = 0 // sets var i to 0 for entry in scan // loop for will do for each entry in scan i = i+1 // sets var i to (i=0)+1 memory_scan = metaxploit.scan_address(metaLib, entry) // scans a specific memory address and returns information about all its vulnerabilities print("<b>"+i+". "+entry+"</b>\n"+memory_scan) // prints entry and its vulnerabilities end for // end of loop for print(metaLib.lib_name+" v"+metaLib.version) // shows on screen name and version of scanned library exit("-- Scan complete --") // exit program with message
Code: Beginner Probe
This script performs exploits on target machine:
//Beginner Probe file: bprobe print("<b>-= Beginner Probe 1.0 =-</b>") if params.len != 5 then if params.len != 4 or params[0] == "-h" or params[0] == "--help" then exit("<b>Usage: bprobe [ip_address] [port] [memory] [exploit] (password)</b>\n<b>Description:</b>\nScript to use external exploits.\nby IZackI") end if metaxploit = include_lib("/lib/metaxploit.so") if not metaxploit then exit("<color=#ff0000>Error: Unable to find 'metaxploit.so'. Put missing library in the 'lib' folder.</color>") decipherFile = get_shell.host_computer.File("/bin/decipher") if not metaxploit then exit("<color=#ff0000>Error: Unable to find 'decipher'. Put missing program in the 'bin' folder.</color>") address = params[0] port = params[1].to_int memory = params[2] exploit = params[3] if params.len == 5 then // check if parameter 5 was provided newPass = params[4] else newPass = null end if net_session = metaxploit.net_use(address, port) if not net_session then exit("<color=#ff0000>Error: Unable to connect.</color>") print("-- Probe --") metaLib = net_session.dump_lib if newPass == null then // if parameter 5 is not empty result = metaLib.overflow(memory, exploit) // performs a buffer overflow attack else result = metaLib.overflow(memory, exploit, newPass) // performs a buffer overflow attack to change password if result then print("<b>New password: "+newPass+"</b>") // prints new password end if if result != null then type = typeof(result) // var type is the type of var result if type != "shell" and type != "file" then exit("<color=#ff0000>Error: This type is not supported.</color>") // if type is not equal to 'shell' and 'file' then exit if type == "shell" then result.start_terminal // if type is shell open terminal if type == "computer" then // if type is computer passFile = result.File("/etc/passwd") // reads content of the file and sets it in passFile var if not passFile then exit("Password file is missing.") // if passFile is empty exit if passFile.has_permission("r") then // check permission of passFile if passFile == null then exit("Password file is empty.") // checks if the passFile is empty fileLocation = "/home/"+active_user // sets var fileLocation to '/home/user_directory' createFile = get_shell.host_computer.File(fileLocation+"/receivedPaswd.txt") // checks if receivedPaswd.txt file exist if createFile then createFile.delete // if old file exist delete it get_shell.host_computer.touch(fileLocation, "receivedPaswd.txt") // creates empty file named 'receivedPaswd.txt' in the user directory get_shell.host_computer.File(fileLocation+"/receivedPaswd.txt").set_content(result.File("/etc/passwd").content) // copies content of '/etc/passwd' to 'receivedPaswd.txt' createFile = get_shell.host_computer.File(fileLocation+"/receivedPaswd.txt") else exit("Unable to access password file") // if no permission to read file '/etc/passwd' end if if createFile == null then // if created file is empty remove file and exit createFile.delete exit("Downloaded password file is empty.") end if while true // loop while - this loop will never end, until user selects 0, 1 or 2 print("Option: ") print("1. Decipher") print("2. Remove file with passwords") print("0. Exit") opt = user_input("Option: ") // this is user option - it waits for user input and stores this value in opt var if opt == "0" then exit("-- Done --") // if user entered '0' exit if opt == "1" then // if user entered '1' get_shell.launch("/bin/decipher", fileLocation+"/receivedPaswd.txt") // execute program '/bin/decipher' with parameter end if if opt == "2" then // if user entered '2' if createFile then createFile.delete // checks if createFile exist and delete it exit("File: 'receivedPaswd.txt' was removed.") end if end while end if else exit("-- Probe Failed --") end if
Scripts in work video
Official documentation
Here you can find all commands with explanation and examples of usage:
https://codedocs.ghtools.xyz/
Other useful information
This is really good guide explaining all the mechanics in the game:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1905138308
Conclusion
As you can see the scripts are quait simple and the is a lot of to improve.
If you study those two scripts you definitely can manage on your own.
Good luck script kittens.
36 Comments
Agent Slimepunk 20 Dec, 2024 @ 1:26pm 
I don't know if it'll let you embed them here, but you might have better luck reuploading your video to Vimeo or something like that. Youtube has really gone down the drain in recent years
Lachupakabra 22 Nov, 2023 @ 4:12am 
The notes are super helpful!
s1csty9 7 Jun, 2023 @ 7:28am 
Hey, I just read the guide and I think that it's really helpful! I'm quite sad that the p*ssy jackasses at youtube decided to take down the video, you can upload it to rumble (video site with less politically motivated censorship) and update the link which would be really helpful :)
IZackI  [author] 11 Dec, 2022 @ 5:07am 
@Loonessia
I give them a full description about what is a video about: game, tutorial and it cannot be used in real life. Never mind that was like a half year ago. Maybe one day I will re-upload it to my site.
Thank you for your advice.
Loon 10 Dec, 2022 @ 5:07pm 
@IZackI I made it clear in my appeal that the video I made was about the game I was playing, if you didn't leave a comment in your appeal, I would try that.
IZackI  [author] 10 Dec, 2022 @ 3:32pm 
@Loonessia
Unfortunately, I appealed the decision, but YouTube in its wisdom upheld its decision about dangerous content. :savedisk:
Loon 10 Dec, 2022 @ 3:11pm 
@IZackI I had the exact same problem with a Hacker Simulator video. YouTube will autoflag videos that may or may not contain real hacking content. All you have to do is file an appeal with them and they'll most likely remove it within hours.
IZackI  [author] 2 Jul, 2022 @ 3:59pm 
Video was removed by YouTube - dangerous content :insfist:
ᵛᵒʷᵏⁱⁱ 2 Jul, 2022 @ 9:31am 
lol the video got removed
Isco 1 Sep, 2021 @ 4:11pm 
Nice the thing is small.Can it be an "essaie".Theres link to more evoluate form of guide and nice reference to codedocs.If those two thing was not present i would gave a thumb down.