ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Hello Mr Chinese IP based hacker

    IT Discussion
    ssh hacking erl edgemax edgerouter
    7
    13
    4.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DashrenderD
      Dashrender
      last edited by

      is it normal for the login name to be blank?

      JaredBuschJ 1 Reply Last reply Reply Quote 0
      • JaredBuschJ
        JaredBusch @Dashrender
        last edited by

        @Dashrender said in Hello Mr Chinese IP based hacker:

        is it normal for the login name to be blank?

        The user is root in that sample. Did you misread logname?

        DashrenderD 1 Reply Last reply Reply Quote 0
        • DashrenderD
          Dashrender @JaredBusch
          last edited by

          @JaredBusch said in Hello Mr Chinese IP based hacker:

          @Dashrender said in Hello Mr Chinese IP based hacker:

          is it normal for the login name to be blank?

          The user is root in that sample. Did you misread logname?

          So I did.

          1 Reply Last reply Reply Quote 0
          • thwrT
            thwr
            last edited by

            Just add a ban for 2 hours after 3 failed logins, will hurt much on their script.

            Added country block (automatically updated CIDR ranges) to my firewalls (pfSense in this case) a few years ago, anything but my country gets blocked. I'm not seeing many attempts anymore since then. This won't help against a professional attempt, but you get rid of 99% of the kiddies.

            JaredBuschJ 1 Reply Last reply Reply Quote 1
            • JaredBuschJ
              JaredBusch @thwr
              last edited by

              @thwr said in Hello Mr Chinese IP based hacker:

              Just add a ban for 2 hours after 3 failed logins, will hurt much on their script.

              Added country block (automatically updated CIDR ranges) to my firewalls (pfSense in this case) a few years ago, anything but my country gets blocked. I'm not seeing many attempts anymore since then. This won't help against a professional attempt, but you get rid of 99% of the kiddies.

              That is a bunch of wasted processing. The connection should simply be dropped and never allowed period.

              thwrT 1 Reply Last reply Reply Quote 2
              • thwrT
                thwr @JaredBusch
                last edited by

                @JaredBusch Sure, is just a quick fix.

                1 Reply Last reply Reply Quote 0
                • travisdh1T
                  travisdh1
                  last edited by

                  Just because the port is closed, that doesn't mean you won't get login attempts to said port. Why it's reaching pam instead of just being dropped tho? That's worrying.

                  JaredBuschJ 1 Reply Last reply Reply Quote 1
                  • JaredBuschJ
                    JaredBusch @travisdh1
                    last edited by JaredBusch

                    @travisdh1 said in Hello Mr Chinese IP based hacker:

                    Just because the port is closed, that doesn't mean you won't get login attempts to said port. Why it's reaching pam instead of just being dropped tho? That's worrying.

                    Right, there is not accept rule for port 22 on the WAN_LOCAL firewall set that is applied. The default for the rule is a drop.

                    So nothing should have ever even shown up. because it should be dropped by default.

                    I added a drop all for port 22 as the first rule (even before the established/related) and it started dropping. At that point I went to bed. I will get back to it this afternoon.

                    1 Reply Last reply Reply Quote 1
                    • AmbarishrhA
                      Ambarishrh
                      last edited by Ambarishrh

                      Almost the same thing happened on one of my servers, funny the guy trying few usernames including "ajay" an indian name! 🙂

                      Time: Fri May 20 15:38:41 2016 +0400
                      IP: 27.221.10.43 (CN/China/-)
                      Failures: 20 (sshd)
                      Interval: 300 seconds
                      Blocked: Permanent Block

                      Log entries:

                      May 20 15:35:47 vcdc-test sshd[10105]: Invalid user a from 27.221.10.43
                      May 20 15:35:51 vcdc-test sshd[10197]: Invalid user b from 27.221.10.43
                      May 20 15:36:25 vcdc-test sshd[10222]: Invalid user user1 from 27.221.10.43
                      May 20 15:36:55 vcdc-test sshd[10257]: Invalid user oracle from 27.221.10.43
                      May 20 15:36:59 vcdc-test sshd[10259]: Invalid user oracle from 27.221.10.43
                      May 20 15:37:27 vcdc-test sshd[10281]: Invalid user postgres from 27.221.10.43
                      May 20 15:37:29 vcdc-test sshd[10287]: Invalid user test from 27.221.10.43
                      May 20 15:37:32 vcdc-test sshd[10289]: Invalid user test from 27.221.10.43
                      May 20 15:37:59 vcdc-test sshd[10316]: Invalid user nagios from 27.221.10.43
                      May 20 15:38:10 vcdc-test sshd[10324]: Invalid user test from 27.221.10.43
                      May 20 15:38:16 vcdc-test sshd[10328]: Invalid user ubuntu from 27.221.10.43
                      May 20 15:38:18 vcdc-test sshd[10332]: Invalid user geoadmin from 27.221.10.43
                      May 20 15:38:21 vcdc-test sshd[10334]: Invalid user geoadmin from 27.221.10.43
                      May 20 15:38:24 vcdc-test sshd[10336]: Invalid user jonesst1 from 27.221.10.43
                      May 20 15:38:26 vcdc-test sshd[10338]: Invalid user jonesst1 from 27.221.10.43
                      May 20 15:38:29 vcdc-test sshd[10340]: Invalid user server from 27.221.10.43
                      May 20 15:38:32 vcdc-test sshd[10342]: Invalid user server from 27.221.10.43
                      May 20 15:38:34 vcdc-test sshd[10344]: Invalid user smithsi from 27.221.10.43
                      May 20 15:38:37 vcdc-test sshd[10346]: Invalid user smithsi from 27.221.10.43
                      May 20 15:38:40 vcdc-test sshd[10348]: Invalid user ajay from 27.221.10.43

                      1 Reply Last reply Reply Quote 0
                      • tonyshowoffT
                        tonyshowoff
                        last edited by tonyshowoff

                        That's why we set any WAN-fancing SSH port to something obscenely high like 41022, not for "security" but because of the logs. In fact, all of our sshd services run following that pattern, as does our internal HTTP(S) servers but the load balancers take in 80/443.

                        This prevents as many services as possible from running as root, which anything running port < 1024 does. I don't think most people even know this. At the very least if there's a NAT in play, one can always set ssh and web services ports much higher and just translate the ports to avoid the same issue.

                        (I know there are some work arounds like setcap on Linux, but in general this is the default behaviour on most machines)

                        For some reason this made me think of The Venture Bros, Hunter Gather says:

                        And we want your sad ass undercover agents to stop trying to infiltrate our group. Frankly we're tired of killing them and we can't afford the body bags!

                        wirestyle22W 1 Reply Last reply Reply Quote 3
                        • wirestyle22W
                          wirestyle22 @tonyshowoff
                          last edited by

                          @tonyshowoff said in Hello Mr Chinese IP based hacker:

                          That's why we set any WAN-fancing SSH port to something obscenely high like 41022, not for "security" but because of the logs. In fact, all of our sshd services run following that pattern, as does our internal HTTP(S) servers but the load balancers take in 80/443.

                          This prevents as many services as possible from running as root, which anything running port < 1024 does. I don't think most people even know this. At the very least if there's a NAT in play, one can always set ssh and web services ports much higher and just translate the ports to avoid the same issue.

                          (I know there are some work arounds like setcap on Linux, but in general this is the default behaviour on most machines)

                          For some reason this made me think of The Venture Bros, Hunter Gather says:

                          And we want your sad ass undercover agents to stop trying to infiltrate our group. Frankly we're tired of killing them and we can't afford the body bags!

                          Useful piece of information. Thanks!

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post