As per title.
I've agreed to sell a 3D printer that has a RPi at it's core, however I've forgotten the password that I set, and it's not the default RPi password.
However I do have the encrypted key from the FTP I used to connect to it, but my skills are failing at successfully decrypting it.
I have the code used to encrypt/decrypt the passwords, however my attempts at running it through a decrypter have so far failed.
I suspect the issue is the FTP code is adding Hex conversions, which the online decrypters can't handle.
Plus all the code is in C++, which I'm fairly hopeless at.
If there's anybody who wants to give this a go, I can supply all the information.
Worst case scenario, the RPi OS needs reinstalled fresh.
Comments
https://speakerimpedance.co.uk/?act=two_parallel&page=calculator
The FTP user probably doesn't have shell access, and could be FTPS (secure FTP), or SFTP (FTP-over-ssh). The latter has more chance of shell access, but probably doesn't have it, and almost certainly not privileged access in any case
If you don't have the original installation media, can you download it or otherwise get a copy from the manufacturer?
Trading feedback here
Trading feedback here
Alternatively, settle down in a nice, comfy chair, a large glass of something refreshing and picture yourself setting it up. Chances are the password will float to the surface of your mind.
AFAIK FTP access is using the main/root user details, as I couldn't be bothered setting up a separate user just for FTP, especially since the files that got modified over FTP are in the main user directory.
Example: Me1234, could be Me1234! (if it requires a special character). It could be one that will not allow 'weak passwords' so you may have entered Me1Me2Me3Me4!! instead.
Best way to tell is to try re-entering a password and see if they give you guidance on what they expect from a strong password.
But I bet it's a variation of one you've used before.
I know the user name is 'pi'.
The FTP client I used was the NppFTP plugin for Notepad++
The hashed password stored is '1BCB6351F77B25D10A'
And the defaultKey used by NppFTP for encryption is 'NppFTP00'
NppFTP is apparently using openssl DES 64bit Cipher Feedback.
The source code for NppFTP is on Github - GitHub - ashkulz/NppFTP: Plugin for Notepad++ allowing FTP, FTPS, FTPES and SFTP communications
And the encryption code is - NppFTP/src/Encryption.cpp at master · ashkulz/NppFTP · GitHub
Which also makes use of Hex conversion in StringUtil.cpp
Somebody has made a decrypter script, but I don't have any easy way of running it - notepad++ nppftp decryption routine · GitHub
Trading feedback here
For anybody to hack the printer, they'd have to first get through my firewall, then hope the printer was actually turned on.
The FTP plugin stores the actual password as a hash, and then decrypts it internally before connecting over SFTP.
Edit the /etc/passwd file
I knew it would have been something simple.