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 07-28-2008, 03:45 AM   #16
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63

Two more details to check;

1) that the client and server are talking the same protocol

What is the actual port number of the talk daemon (I see the work "talk" above in netstat, but I need the number)

netstat -an | grep ':51[78]'

2) that you have no firewall interfering the the required port.

Are you running iptables or selinux?
 
Old 07-28-2008, 05:27 AM   #17
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Hmm... 'denial of use' comes to mind. Spamming people with banners, dictionaries, and the Complete Works of William Shakespeare were common pranks in schools.
 
Old 07-28-2008, 07:15 AM   #18
Bendude
LQ Newbie
 
Registered: Jan 2008
Location: Australia, Mandurah
Distribution: Fedora Core 13
Posts: 27

Original Poster
Rep: Reputation: 15
ok heres the output for netstat -an | grep ':51[78]'


udp 0 0 0.0.0.0:518 0.0.0.0:*
udp 0 0 127.0.0.1:49223 127.0.0.1:517 ESTABLISHED
udp 0 0 192.168.1.102:45528 192.168.1.100:517 ESTABLISHED


sorry im new to linux well we both are,

iptable - selinux? How can i tell?

Thanks
 
Old 07-28-2008, 11:45 AM   #19
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Ok, there's your problem. You are using the old talk client (port 517) and the new talkd (518).

use ntalk or ytalk. The talk client you use must use the same port as the talkd.
 
Old 07-28-2008, 11:53 PM   #20
Bendude
LQ Newbie
 
Registered: Jan 2008
Location: Australia, Mandurah
Distribution: Fedora Core 13
Posts: 27

Original Poster
Rep: Reputation: 15
Hey thanks for that.

I have now installed ytalk as ntalk was not available

And i am getting the error message no talk daemon on mycomputer.

I am guessing this means it can still not find the server

i have talkd installed and no firewall running.

Thanks
 
Old 07-29-2008, 05:55 AM   #21
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 772

Rep: Reputation: 242Reputation: 242Reputation: 242
Edit the talk service blocks listed in xinetd.conf and restart xinetd. Here it shows user root due to the lower number port it needs to bind. It may be able to use something such as 'nobody', providing xinetd binds the port then drops privs, but I didn't test.

Code:
enabled     = ntalk talk

# This talk is on 517/udp
service talk
{
        socket_type = dgram
        protocol    = udp
        wait        = yes
        user        = root
        server      = /usr/sbin/in.talkd
}


service ntalk
# Port 518 UDP. This is an alternate port. Solaris/Sun (?) machines
# use one of these and not the other. Linux uses one and not the other.
{
        socket_type = dgram
        protocol    = udp
        wait        = yes
        user        = root
        server      = /usr/sbin/in.talkd

}
Adjust the paths in 'server' for you system if different. Set youself(ves) 'talkable': mesg y. Or run 'mesg' to verify talkability. If those commands fail, likely you have wrong permissions on your terminal entries.

Reload the xinetd config and verify the daemon is listening on all interfaces (or desired interface(s) on a multihomed system).

Code:
 ss -ua | grep talk
UNCONN     0      0                       *:talk                     *:*       
UNCONN     0      0                       *:ntalk                    *:*

root> pkill -SIGUSR2 xinetd
Read the xinetd start/restart/reload messages in its logs and make sure all services restart OK. If trouble, kill the daemon entirely and start up fresh.

If in the console, login on tty1 and tty2. If in X, start two {A|Mrxvt|X|Rxvt|E]terms. Use 'who' to see where you need to talk to. The below shows I logged in on tty1 and then started an X11 session. Then in the first I talk to myself in the second term, which is pts/2. You can't believe the talk daemon message because talk daemon didn't know about pts terminals when it was built, so you can't just do user@host unless you've only one terminal going (like a single console login). You also can't talk to yourself on the same tty/pts, at least in my version.


[code]

1>mesg y

1>mesg
is y


1> who
jayjwa pts/2 2008-07-29 06:15 (:0)
jayjwa tty1 2008-07-28 20:18
jayjwa pts/1 2008-07-28 22:21 (:0)

1>talk jayjwa pts/2

Message from Talk_Daemon@vdrl.ath.cx at 6:15 ...
talk: connection requested by jayjwa@vdrl.ath.cx
talk: respond with: talk jayjwa@vdrl.ath.cx

2>talk jayjwa pts/1

[No connection yet]
[Waiting for your party to respond]
[Waiting for your party to respond]
[Connection established]


[No connection yet]
[Connection established]

Talk? No one runs talk anymore except me, you, and some guy in Germany...
-oo
^C

[\code]

If this still doesn't work, make sure you're not running some odd network firewall/manager thing. Check iptables are clear ( iptables -L INPUT -n -v ; iptables -L OUTPUT -n -v ). Set a sniffer up on the machine in question and try to use the talkd. Watch the packets and see if they go where they are supposed to. Talk uses /var/run/utmp(x). First (mine) tries to open it RW then fails, then opens RO. Make sure you have that and its RO for users. Run 'strace talk someone pts/1' and follow the execution path. It should load libs, look at the resolver stuff, look for utmp, read the /etc/services file, etc, and then attempt a connection. Some steps left out:

Code:
open("/lib/libdl.so.2", O_RDONLY)       = 3
access("/var/run/utmpx", F_OK)          = -1 ENOENT (No such file or directory)
open("/var/run/utmp", O_RDWR|O_LARGEFILE|0x80000) = -1 EACCES (Permission denied)
open("/var/run/utmp", O_RDONLY|O_LARGEFILE|0x80000) = 3
open("/etc/resolv.conf", O_RDONLY)      = 3
open("/etc/nsswitch.conf", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1362, ...}) = 0
open("/etc/services", O_RDONLY|0x80000) = 3
fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
sendto(3, "\1\2\0\0\0\0\0\2\0\2\311I\300\250\nL\0\0\0\0\0\0\0\0\0"..., 84, 0, {sa_family=AF_INET, sin_port=htons(518), sin_addr=inet_addr("192.168.10.76")}, 16) = 84
sendto(3, "\1\2\0\0\0\0\0\0\0\2\311I\300\250\nL\0\0\0\0\0\0\0\0\0"..., 84, 0, {sa_family=AF_INET, sin_port=htons(518), sin_addr=inet_addr("192.168.10.76")}, 16) = 84
talk/talkd working relies on many parts of the system being setup and working correctly.

Hardening: Maybe look at the sources and fix them up. Link in libssp if possible (didn't check). Use xinetd to limit access to appropriate hosts. I've ran talkd for over 6 years and no one's messed with it (so far....). Talk is good for quick unix-to-unix access when you don't know if the person is running other things, or at least it was when everyone ran talkd. If you need real security/authentication, you might look into Silc. There is a talk setup in GNU's 'inetutils' as well. Likely it is better maintained than the old Netkit ones, which I don't think are being actively maintained anymore. ytalk is a bit different. The above talks are the inetutils ones.

Last edited by jayjwa; 07-29-2008 at 06:17 AM. Reason: May be possible to drop privs to nobody
 
  


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
LXer: Top tech security risks and cash-sappers LXer Syndicated Linux News 0 05-30-2008 09:20 AM
hosting web and e-mail security risks metallica1973 Linux - Security 8 04-10-2006 09:39 AM
what are the security risks using 'passwd' in shell scripts? MisterESauce Linux - Security 5 04-10-2005 01:48 PM
Security risks of php based mysql queries TigerOC Linux - Security 5 04-10-2005 07:30 AM
samba/apache machine security risks fatman Linux - Networking 1 01-16-2004 09:31 PM

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

All times are GMT -5. The time now is 06:14 PM.

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