Assume I run a custom app on an arbitrary port on a linux box - let's say 7890.
This is a go language web server. Runs an app on top of HTTP. No HTTPS. It runs as a dedicated but "normal" user with no sudo rights. The firewall rule for this port allows "everyone (world)" to access it.
All ssh access is secured and firewall rules allow only access via a set of known IPs. SSH access is configured to allow only key-based access.
Is this enough information to answer the following questions:
- Can an attacker ever gain access to the command line via that exposed port?
- If the previous question can be answered with "yes, if...", what are the most important things I need to take care of so that the app can't be exploited to get access to the box?
The assumption would be that there are no other known security holes.
Obviously I am no security expert. I hope this is enough information to give an informed statement. I assume there are myriads of related issues and no "absolute" yes/no can be given, but maybe some rough idea is enough for me to get an idea.
Thanks.
/etc/passwd
,/etc/groups
,/etc/sudoers
. Readman -a passwd;man sudo sudoers
.