How can someone hack into a Linux server ?

Discussion in 'all things UNIX' started by SuperHax, Jun 30, 2013.

Thread Status:
Not open for further replies.
  1. SuperHax

    SuperHax Registered Member

    Joined:
    Aug 9, 2012
    Posts:
    20
    Hi!

    I have a debian linux VPS and i am wondering how would someone be able to hack into it , in what ways ?

    I've asked a more knowledgeable friend and he said the only way someone would be able to get into my VPS is via FTP or SSH, are there some other ways someone can enter my machine ?

    I have extremely strong passwords for all the accounts enabled and use fail2ban as well to ban SSH and FTP attackers.

    I don't use apache,mysql,email accounts and update the server as often as possible.

    Would appreciate if some of you guys could tell me, in what ways can my machine be compromised ?

    Thanks.
     
  2. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,698
    There are many ways. It really depends on the specific usecases.
    Mrk
     
  3. NGRhodes

    NGRhodes Registered Member

    Joined:
    Jun 23, 2003
    Posts:
    2,331
    Location:
    West Yorkshire, UK
    The only way to be hacked is via the running services, is FTP and SSH the only things running ?

    If so (very general google-able) :
    FTP - Look at using SFTP instead, make sure your not using a root account.
    SSH - Look at using a passphrase protected ssh public/private key.

    As Mrk states, really depends on your usecases as to how can be hacked and hardened against.

    Cheers, Nick
     
  4. SuperHax

    SuperHax Registered Member

    Joined:
    Aug 9, 2012
    Posts:
    20
    Other than FTP and SSH i do just 2 things, use lighttpd so i can host files and run a srcds game server.

    I will look into switching to SFTP ,in what ways would this be better than regular FTP ?
     
  5. NGRhodes

    NGRhodes Registered Member

    Joined:
    Jun 23, 2003
    Posts:
    2,331
    Location:
    West Yorkshire, UK
    All FTP transmissions are plain text, including user credentials. SFTP is based on SSH which secures user auth and data transmission channels.

    I am afraid I don't know any specifics about securing lighttpd and scrd.

    Cheers, Nick
     
  6. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,698
    Don't forget someone sending you a file called virus.sh and asking you to run it with root permissions. And such.
    Mrk
     
  7. Nebulus

    Nebulus Registered Member

    Joined:
    Jan 20, 2007
    Posts:
    1,582
    Location:
    European Union
    As a general rule (and as others pointed out):

    1. Make sure that you properly configure ALL of the services that are exposed on your server (in your case FTP, SSH, lighttpd and srcds).
    2. Make sure you keep your server up to date.
    3. Try to restrict access to some of the services only to the host that need to use your server. This is impossible for lighttpd if you want everyone to access your web server, but it might be possible for SSH for instance, if you are the only one using it.
    4. Use secure communication channels (as NGRhodes pointed out above) in order to limit a possible data/passwords sniffing.
     
Loading...
Thread Status:
Not open for further replies.