-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to authentificate using the PAM backdoor on CentOS 6.x #13
Comments
Already reported here: #5 (comment) |
Apologies. Will look at version changes more in-depth tomorrow. Only went on small assumptions. :/ |
Thank you. Is there other method to remotely connect to a server where the rk was installed except for the ssh? I mean like connectin from my linux box to the server? Also when using the ssh backdoor port are there any logs saved? |
Btw until the ssh/pam backdoor is fixed, how can I connect to the the sever where the rk was installed using netcat supposing low port is 10000 and high port is 10004 (that was configured during rk install) Thanks again! |
Not sure if you have changed anything in the rootkit but know the error changed (I have used the latest version from github a new fresh centos 6 vps minimal install) root@pve1:/opt# ./ssh.sh bogdan 172.16.100.50 8197 I thought is good to share this information with you. PS: How do I connect using netcat to get a shell? |
The bug might actually be fixed. I ran into this bug a couple of times using ssh.sh to connect, but could connect without it, suggesting ssh.sh is the perpetrator in this situation.. I'd always fix it locally and forget to update it on the repo. Pull the latest commit and try again. If you can install a web server (shouldn't be done in a real situation if there's not already one installed) and use the snodew backdoor, it will give you a reverse root shell assuming suid bins aren't disabled on the box. The accept backdoor doesn't work in most situations. Since the accept backdoor is somewhat deprecated, I'd like to only work on the accept backdoor if it's absolutely vital - but in time I probably will make updates and improvements to it. Edit: I'm working on my own local version, and I'm making significant changes to it. Said changes are mostly optimisation, couple of changes to hooks and functions, may just resolve and improve the accept backdoor while I'm doing that. |
root@pve1:/opt# sh ssh.sh sweed29 172.16.100.51 8197 For some reason now it tries to login using the private key. I have checked and I have no private key generated for that user on my local box and user sweed29 does not actually exist on the remote box (where to rootkit is installed). I have managed to connect using the nc -p 10000 host 22 (there is no web server installed) but that shell seems to be limited to just a few commands. So I really think that a working ssh backdoor is the way to go. Thank you for all your efforts. Maybe I am not doing something right but it's still not working. I have spinned a new clean centos 6.8 minimal install vm and got the source from git, and installed (I have destroyed the previous vm). |
@bogdanstoica35 It isn't trying to authenticate using private key, the listing at the end ( @mempodippy Did you tried to install vlany on CentOS 5.11 because it doesn't want to install because of this error:
I think it's because the python version of CentOS 5 is a bit old ( |
That's annoying... Will update a fix to that problem soon. |
@mempodippy I fixed the issue (#14), I'm currently testing if vlany is working fine on CentOS 5.11. |
It fails on |
config.py uses str.format very frequently, especially when setting up const.h. |
@mempodippy There are so many lol, I'll try convert them tomorrow (it's 1am UTC+1 for me) because it fails too with a quick try (5a7d300). |
Appreciated, and it's quite late here too. Will be up later so I'll probably catch up on small changes and work on my local version a bit. |
Yeah well, in the end it is still not working on centos 6. Can authenticate via the ssh backdoor! I will try on a fresh centos installed, re-install vlany and see if it works or not. I'll keep you posted! |
After a new fresh install, this is the result: root@pve1:/opt# ./ssh.sh sweed29 172.16.100.54 65534 The previous errors are gone. Am I doing something wrong?! PS: Is it an issue that the centos vm is an lxc container in fact? I can spin a kvm vm if necessary... |
On the vm where the rootkit is installed: Jan 15 04:40:54 centos sshd[1226]: Server listening on 0.0.0.0 port 22. On the server where ssh.sh is and after waiting for about 2-3 minutes root@pve1:/opt# ./ssh.sh sweed29 172.16.100.54 65534 Wasn't it supposed to hide the connections on the backdoor? Like not showing the login in the logs?! |
The failed connections are logged because it's by default in the openssh server. Only successful connections are hidden from the logs. EDIT: There is a bug at the install, it's caused by my commit (#14), you can temporally use a old version of vlany (this was in WIP work in progress but @mempodippy merged the commits) :
EDIT²: I can reproduce the bug reported by @bogdanstoica35. |
So it is not related to a lxc container, the behavior is the same on both lxc vm snd kvm vm |
Any updates on this?! |
I'll resolve my issue when I'll have some time because currently I'm busy. |
Sorry, I've been very busy. In the next few days or so I'm going to push a significant update. |
I am still unable to login via ssh using the backdoor username. I can login with a real regular user or root account though. Is there anyway that the connections to ssh using the backdoor port to be not logged at all? I mean the way I see it, that's the purpose of a rootkit right? To be able to connect to a server without anyone being able to see you connected or any trace to appear in the server's logs... |
@mempodippy didn't pushed since a long time so that's normal that the bug isn't resolved. |
There's a disclaimer in the README. Refer to that. |
I am pretty aware about what vlany is and I have also had read the Readme file. I thought that testing or suggesting features or any other stuff like this would be helpfull for the improvement or the development of vlany. Nothing else! |
It is helpful, thank you. I just need to make myself some time. |
Any news? |
I'm moving, will have more time after that. |
I have succesfully installed vlany on a clean centos box (a kvm vps), centos 6.8 x64 distro with the latest updates (the minimal install). Nothing else is running on that vps since is was specifically created to test your rootkit.
I am using sh ssh.sh username localhost port (it connects to the sshd daemon to the backdoor ssh port specified during rootkit install). But the user/pass combination always fails.
Any help would be really appreciated!
Keep developing this really nice rootkit!
The text was updated successfully, but these errors were encountered: