LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-15-2022, 01:06 AM   #1
farhadka
LQ Newbie
 
Registered: Feb 2022
Posts: 4

Rep: Reputation: 0
rsh authentication failure


hi
I'm trying Mitnick attack for a lab with docker, in terminal container I made .rhosts file and wrote the trusted server's ip in it (echo 10.9.0.6 > .rhosts) and also made it writable only for owner (chmod 644 .rhosts) but when I use "rsh 10.9.0.5(terminal's ip) date" in the server, I see authentication error, what should I do and how can I fix this?
 
Old 02-15-2022, 01:36 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by farhadka View Post
hi
I'm trying Mitnick attack for a lab with docker, in terminal container I made .rhosts file and wrote the trusted server's ip in it (echo 10.9.0.6 > .rhosts) and also made it writable only for owner (chmod 644 .rhosts) but when I use "rsh 10.9.0.5(terminal's ip) date" in the server, I see authentication error, what should I do and how can I fix this?
I was curious, seems to be this: https://seedsecuritylabs.org/Labs_16...ick_Attack.pdf
We really need morte information on this. No modern Linux system will allow you to access it remotely just like that, and rsh is outdated, apparently you have to jump through hoops to even get it on your system.
 
Old 02-15-2022, 01:56 AM   #3
farhadka
LQ Newbie
 
Registered: Feb 2022
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ondoho View Post
I was curious, seems to be this: https://seedsecuritylabs.org/Labs_16...ick_Attack.pdf
We really need morte information on this. No modern Linux system will allow you to access it remotely just like that, and rsh is outdated, apparently you have to jump through hoops to even get it on your system.
yeah that's true
I've installed rsh-redone that re-implements remote shell (as its mentioned in that file), but I dont know why I see that error and how should I fix it
 
Old 02-15-2022, 02:22 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Which distro etc.
This still isn't enough information.
Please don't make us ask for every little bit separately.
 
Old 02-15-2022, 04:39 AM   #5
farhadka
LQ Newbie
 
Registered: Feb 2022
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ondoho View Post
Which distro etc.
This still isn't enough information.
Please don't make us ask for every little bit separately.
I'm so sorry I didn't know what information you are asking
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
Docker version 19.03.8
docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
rsh-redone-server/client 85-2build1
 
Old 02-16-2022, 01:14 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Good, thanks.
Correct me if I'm wrong but it would seem that we need precisely that info for both systems involved?

What is the exact command, what is the full output? Please use CODE tags for that (see my signature).
If rsh has a verbose option, please use that ("man rsh").
 
Old 02-16-2022, 03:13 AM   #7
farhadka
LQ Newbie
 
Registered: Feb 2022
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ondoho View Post
Good, thanks.
Correct me if I'm wrong but it would seem that we need precisely that info for both systems involved?

What is the exact command, what is the full output? Please use CODE tags for that (see my signature).
If rsh has a verbose option, please use that ("man rsh").
no there is not another system, just one, and im using containers for the lab, one for attacker,one for terminal and one for trusted server
first i use this code:
Code:
$ docker-compose build
x-terminal uses an image, skipping
trusted-server uses an image, skipping
Building attacker
Step 1/3 : FROM handsonsecurity/seed-ubuntu:large
 ---> cecb04fbf1dd
Step 2/3 : ARG DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> 0b46b3129601
Step 3/3 : RUN apt-get update     && apt-get -y install           rsh-redone-client           rsh-redone-server     && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 871d73ab78dd

Successfully built 871d73ab78dd
Successfully tagged seed-image-ubuntu-mitnick:latest
and then:
Code:
$ docker-compose up
Creating network "net-10.9.0.0" with the default driver
Creating seed-attacker           ... done
Creating trusted-server-10.9.0.6 ... done
Creating x-terminal-10.9.0.5     ... done
Attaching to seed-attacker, x-terminal-10.9.0.5, trusted-server-10.9.0.6
x-terminal-10.9.0.5 |  * Starting internet superserver inetd             [ OK ]
then in the root in new terminal:
Code:
$ dockps
493e2cace4de  trusted-server-10.9.0.6
776e3afbdfc1  x-terminal-10.9.0.5
2aec5def0191  seed-attacker
then i open terminal container:
Code:
$ docksh 77
root@776e3afbdfc1:/# touch .rhosts
root@776e3afbdfc1:/# echo 10.9.0.6 > .rhosts
root@776e3afbdfc1:/# chmod 644 .rhosts
root@776e3afbdfc1:/# exit
finally for trusted server:
Code:
$ docksh 49
root@493e2cace4de:/# rsh 10.9.0.5 date
Authentication failure
 
Old 01-27-2024, 08:35 AM   #8
redteamlegion
LQ Newbie
 
Registered: Jan 2024
Posts: 1

Rep: Reputation: 0
use su seed @farhadka

use su seed and then try, it will print date on screen, only seed user allowed to log into the xterminal.
 
Old 01-29-2024, 10:44 AM   #9
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 795

Rep: Reputation: 255Reputation: 255Reputation: 255
AFAIK, .rhosts is set up like
Code:
example.org   auser
and not just IP like you have it. The above will allow auser@example.org in. Furthermore, the username and incoming hostname need to be as the remote machine will see it which matters on a multi-homed host. I have my .rhosts 0600. Obviously you need the remote server running rshd, listening, and not firewalled. I don't know about Docker or rsh-redone (inetutils rsh still works).

Code:
jayjwa@atr2 ~> rsh -4 lunast show status

  Status on  29-JAN-2024 10:49:32.36     Elapsed CPU :   0 00:00:00.12
  Buff. I/O :       28    Cur. ws. :     611    Open files :         2
  Dir. I/O :         8    Phys. Mem. :   392    Page Faults :      425
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Failure after failure after failure.....etc 69Rixter Linux - Laptop and Netbook 5 04-14-2015 09:58 AM
PAM Authentication failure Authentication token no longer valid, allowed in anyway quikster Linux - Server 1 03-12-2015 02:37 AM
[SOLVED] chkconfig rsh on- error reading information on service -rsh SurbhiJain Linux - Newbie 1 08-12-2010 01:53 PM
rsh error: protocol failure in circuit setup Andrea Linux - Networking 5 09-17-2009 01:15 PM
RSH: remuser too long error when rsh is executed from IIS dev33445 Programming 0 08-29-2005 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration