Grey Hack

Grey Hack

Not enough ratings
How to use Rshell
By george2781
A very basic guide to Rshell, how to use it with executable files, how to use it with social engineering, and why you would use Rshells in the first place.
   
Award
Favorite
Favorited
Unfavorite
What is Rshell?
Rshell is a term for the remote shell service in grey hack, it is currently only available in the nightly build It was recently added to the main build of the game.
The basics of Rshell
Rshell allows you to have remote shells that connect to a central server, once you have completed the first contract and have access to the hackshop you can download the 2 core files, of which are 'rshell-server' and 'rshell_interface', using these files you can get to work, please note that I advise you to do this on a rented server rather than your actual in-game PC as these are server programs and likely have vulnerabilities.
Installing the Rshell server
To install the Rshell server, just download and execute rshell-server from the hackshop, to manage the connections you need to forward port 1222 and run rshell_interface
Using Rshell and creating the backdoor
To use Rshell, first you need to actually place one, you'll need to compile some code here.
Open CodeEditor and paste in the following:
NOTE: metaxploit.so NEEDS to be located at /lib/metaxploit.so, without this file on the target machine the Rshell cannot be planted!
metaxploit = include_lib ( "/lib/metaxploit.so" ) metaxploit.rshell_client ("[IP]",1222,"rootkit")
(replacing [IP] with the IP of the Rshell server you made earlier)
Then compile and save it as whatever you want, then infiltrate the device you want to put the backdoor on, once you've infiltrated the device, you want to upload the compiled file you made earlier and run it on the victim's PC, afterwards you can delete the file, from there do what you need to do and disconnect. Finally check back on your Rshell server, running rshell_interface should give you a ui showing the shell's existence and the ability to connect to it
Rshell and social engineering
Social engineering can also be used to trick a user into running an rshell, albeit this will likely come with some difficulty, as you need access to an NPC's email account.
First, you need at least guest access to the machine, odds are this will come in the form of a guest shell unless you're using a more advanced hacking tool. From there you need to check how many users there are, if there are 2 or more users then odds are this will work.
Then you need to get the contents of 2 users' Mail.txt config files, and decipher at least one of them. Getting the contents of these files is as simple as running "cat /home/[username]/Config/Mail.txt (replacing [username] with the NPC's username). Using the decipher tool on one of them should be somewhat of a similar experience, albeit if you're having trouble using the regular decipher tool on the Mail.txt file I suggest looking online (outside of the game) for an enhanced decipher tool, as these are often much easier to use remotely than the game's default one.
Once you've gotten your 2 emails and deciphered the password to one of them, it's rshell time. Open your mail app and log into the NPC's email by clicking the little person icon, it should look relatively similar to the one below, albeit mine might look a little different to yours because I use the enigmatic theme.



Clicking that should open a popup window that asks for a user and password, enter the NPC whos email password you deciphered into the user box and the password into the password box, then click login.
A new mail inbox window should open, albeit this time it's the emails of the NPC who's account we just logged into.
Now, from here you need to write a new email, selecting 'Funny game' as the type, then click on the 'CoolShooter.exe' attachment, it should ask for an IP and a port, do you see where this is going? Type the IP of your rshell server that you set up earlier in the guide in the IP box, and 1222 in the port box, then click send. If all goes well, you should get back an email that reads something along the lines of "Just ran it, hope it's gory :)". If you got that email, then congratulations, you have successfully socially engineered an NPC into giving you remote access to their account. From there you simply open the rshell_interface on your rshell server and then use the new shell that should have appeared under the victim's IP.
Why use Rshell in the first place?
I bet some of you are wondering, why use rshell in the first place? Can't I just use local exploits? Well, here are a few good reasons for you.
  • Rshells can get you a shell where you can only get file/computer objects.
    Some readers might not know what those are, and if you don't then feel free to skip over this part, but while file and computer objects can grant some access to the system, they can't get you a shell, which is important for some missions such as those requiring you to modify a police/school record. Rshells can bridge that gap through social engineering, as explained in the previous section of this guide.
  • Rshells are persistent-ish.
    So if you have to close the game for any reason, you can just resume at the last Rshell you planted as opposed to having to go through an entire hack again. Of course that's so long as nobody decided to kill your rshell, which NPCs don't do.
  • Rshells don't need advanced tools.
    So you don't need to find and download advanced hacking tools or risk getting Rshelled yourself to complete some missions where it's harder to escalate from guest to root.
Of course, Rshells aren't a magical fix to all of your problems, Rshells depend on a service, which, if vulnerable, could put your entire server at risk, but they are a somewhat simple solution to some considerably difficult problems.
That's it! Enjoy your remote shell!
That's all you need for a basic rshell server and client, you can make any part of the code more advanced if you'd like to but that's the basics.

If you have any questions or concerns please feel free to DM me on steam!
8 Comments
spooker 28 Dec, 2024 @ 4:30pm 
@ximitimix. don't know if youre still on this but.. connect to one of your shells. in terminal type 'ps' to list the processes. it should come up with a list including the rshell_client with a PID number. type 'kill [PID]' (eg: 'kill 8303') and that will kill the shell permanently
enjenir gayming 4 Oct, 2024 @ 1:28pm 
removing the "1222" and "rootkit" parameters works too, just add the IP of the server you want to phone home to.
TheJeffGuy 10 Apr, 2024 @ 12:01am 
I just started playing this game, and was playing around with this trying to get root to wipe my logs.
The code wouldn't compile. I was getting an error that said the compiler was seeing a comma when it should've seen a ")"

I cut metaxploit.rshell_client ("[IP]",1222,"rootkit")
down to metaxploit.rshell_client ("[IP]:[port]")
It compiled, but I haven't been able to test if it actually works yet.
Chusti 5 Apr, 2024 @ 6:32am 
Not working, got " Runtime Error: type error (while attempting to look up rshell_client) [line 2] "
ximitimix 26 Jun, 2023 @ 9:56pm 
Is there currently anyway to kill the rshell server so it stops running?
KTachyon 18 Sep, 2022 @ 2:52pm 
Is there a way to actually bounce connections from an rshell using a script just like the Map.exe does?
Isco 1 Sep, 2021 @ 5:05pm 
Nice well documented , guide.Theres missing alot up to date project, yours fill some holes.Thanks.
Lutavian 26 Feb, 2021 @ 1:21pm 
I get error "Runtime Error: type error (while attempting to look up rshell_client) [line 2] any suggestions?