LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-17-2019, 05:06 AM   #1
lelunicu
Member
 
Registered: Jun 2019
Posts: 105

Rep: Reputation: 0
port


hi,
let`s say an application listen on port 50 and run with root user.
If somebody external has access to the socket on which this application is bond how this hacker will receive root access?
tnx
 
Old 07-17-2019, 06:20 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,779

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
that depends on the app, nothing else. So we cannot tell you.
 
1 members found this post helpful.
Old 07-17-2019, 06:44 AM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,573

Rep: Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684
Quote:
Originally Posted by lelunicu View Post
hi,
let`s say an application listen on port 50 and run with root user.
If somebody external has access to the socket on which this application is bond how this hacker will receive root access?
tnx
#1, well behaved, secure application may be started by root but run with restricted authority.
#2, your question is so very general, the port is irrelevant. IT is listening on a port is enough.
#3, the way someone would aquire root access depends entirely upon the application. If it intenionally or through a flaw in the design or code allows either direct access, indirect access, or execution of a flawed read that can be used (as one example)to execute external code using a buffer or block overflow condition, then it might be used either for access or for forcing a denial of service condition. It is not that the application is listening, it is what it DOES when it is listening and connections are used. The application behavior is the vulnerability.

Applications that listen for network connections are secured by reducing authority (see #1 above), reducing network exposure (only allowing connections from known safe nodes or networks), and secure coding of the application so that it does not constitute a vulnerability. Recently a new option has been added: run the application in a container so that it has no access to the host. This is the "ok, I know I have flaws, so leave the door unlocked and let anyone break into this jail cell and join me" option. The risk is that access to the container MAY be used to advance other attacks or with a container flaw to escalate to the host.

[edit] is this homework? Because it just struck me that this is the kind of basic question that miht be asked in "security 101, preperation for the program" on day 2.
 
Old 07-17-2019, 01:54 PM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,217

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by lelunicu View Post
hi,
let`s say an application listen on port 50 and run with root user.
If somebody external has access to the socket on which this application is bond
It is not possible for an external user to have access to that socket.

This is the correct answer. You see that "Thread Tools" dropdown? There's an option to mark the thread as "solved". Choose it.

Last edited by dugan; 07-17-2019 at 02:12 PM.
 
Old 07-18-2019, 02:50 AM   #5
lelunicu
Member
 
Registered: Jun 2019
Posts: 105

Original Poster
Rep: Reputation: 0
i will chose the option -solved-but not because you written it.this is only that i like to chose it-no answer is right.
 
Old 07-18-2019, 11:14 AM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,217

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by lelunicu View Post
i will chose the option -solved-but not because you written it.this is only that i like to chose it-no answer is right.
Nonsense. I gave you the correct answer.

If you do not understand that, then think about it until you do.

Last edited by dugan; 07-18-2019 at 01:23 PM.
 
Old 07-19-2019, 05:39 AM   #7
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,573

Rep: Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684
Quote:
Originally Posted by dugan View Post
It is not possible for an external user to have access to that socket.

This is the correct answer. You see that "Thread Tools" dropdown? There's an option to mark the thread as "solved". Choose it.
Actually, it would be quite easy for me to give an external user access to that socket. IF I could, then someone else could. What exactly are you thinking about when you say that "It is not possible..."?
 
Old 07-19-2019, 07:46 AM   #8
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,217

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
I forgot that open sockets showed up in /proc.

Sorry

Last edited by dugan; 07-19-2019 at 07:55 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] IPtables : ssh port forwarding one port to another port issue routers Linux - Networking 7 08-07-2018 08:41 AM
Four-port KVM switch that sends keyboard data to PS2 port and mouse data to USB port Ulysses_ Linux - Hardware 5 06-20-2015 11:16 AM
[SOLVED] iptables port forward not working for port range mapping to anohter Port range in Linux 2.6.39 kinghong66 Linux - Networking 2 06-17-2015 07:17 PM
Tomcat6 stops listening on port 80 when i change from port 8080 to port 80 trongthect Linux - Server 1 07-27-2012 05:41 PM
--destination-ports port[,port[,port...]] KevinGuy Linux - Networking 1 03-16-2004 06:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:02 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