Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Our server is hacked: foreign addresses in china, finland, france etc

Our server is hacked: foreign addresses in china, finland, france etc

Scheduled Pinned Locked Moved Solved Support
security
29 Posts 9 Posters 2.8k Views 11 Watching
  • 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.
    • BrutalBirdieB BrutalBirdie

      @ZeZaung also I highly doubt you made a disk image of the server for forensic analytics, right?

      L Offline
      L Offline
      LoudLemur
      wrote on last edited by
      #16

      @BrutalBirdie Does Cloudron have a "click to create disk image" button?

      BrutalBirdieB 1 Reply Last reply
      0
      • L LoudLemur

        @BrutalBirdie Does Cloudron have a "click to create disk image" button?

        BrutalBirdieB Online
        BrutalBirdieB Online
        BrutalBirdie
        Partner
        wrote on last edited by BrutalBirdie
        #17

        @LoudLemur a disk image is a complete bit to bit copy to a file of the whole drive.
        There is no way a software running on the same drive and at the same time that can create such an image, since it would recursively write it self into infinity.

        For that you need a live boot and create it yourself with dd or a tool like clonzilla.

        For more details: https://wiki.archlinux.org/title/disk_cloning

        Like my work? Consider donating a drink. Cheers!

        L 1 Reply Last reply
        0
        • andreasduerenA andreasdueren

          Piggybacking on this thread: I was wondering for a while about enabling 2fa for SSH. would this interfere with cloudron?

          P Offline
          P Offline
          privsec
          wrote on last edited by privsec
          #18

          @andreasdueren said in Our server is hacked: foreign addresses in china, finland, france etc:

          Piggybacking on this thread: I was wondering for a while about enabling 2fa for SSH. would this interfere with cloudron?

          @jdaviescoates said in Our server is hacked: foreign addresses in china, finland, france etc:

          @andreasdueren said in Our server is hacked: foreign addresses in china, finland, france etc:

          I was wondering for a while about enabling 2fa for SSH. would this interfere with cloudron?

          I shouldn't think so.

          Personally I never have login with a password enabled and only have login via SHA public/ private keys enabled. Not sure what benefit 2FA would have in that case, but I'm presuming you've got a root password?

          I have all accounts require username, password, SSH with a key and 2FA

          1 Reply Last reply
          1
          • BrutalBirdieB BrutalBirdie

            @LoudLemur a disk image is a complete bit to bit copy to a file of the whole drive.
            There is no way a software running on the same drive and at the same time that can create such an image, since it would recursively write it self into infinity.

            For that you need a live boot and create it yourself with dd or a tool like clonzilla.

            For more details: https://wiki.archlinux.org/title/disk_cloning

            L Offline
            L Offline
            LoudLemur
            wrote on last edited by
            #19

            Thanks. For a cloned disk image to be useful, wouldn't it also have to be very recent, too? Repeatedly cloning the entire disk and then archiving these images would be resource intensive.

            Perhaps information from btrfs or ZFS might be useful, if they were the file system.

            @BrutalBirdie said in Our server is hacked: foreign addresses in china, finland, france etc:

            @LoudLemur a disk image is a complete bit to bit copy to a file of the whole drive.
            There is no way a software running on the same drive and at the same time that can create such an image, since it would recursively write it self into infinity.

            For that you need a live boot and create it yourself with dd or a tool like clonzilla.

            For more details: https://wiki.archlinux.org/title/disk_cloning

            BrutalBirdieB 1 Reply Last reply
            0
            • L LoudLemur

              Thanks. For a cloned disk image to be useful, wouldn't it also have to be very recent, too? Repeatedly cloning the entire disk and then archiving these images would be resource intensive.

              Perhaps information from btrfs or ZFS might be useful, if they were the file system.

              @BrutalBirdie said in Our server is hacked: foreign addresses in china, finland, france etc:

              @LoudLemur a disk image is a complete bit to bit copy to a file of the whole drive.
              There is no way a software running on the same drive and at the same time that can create such an image, since it would recursively write it self into infinity.

              For that you need a live boot and create it yourself with dd or a tool like clonzilla.

              For more details: https://wiki.archlinux.org/title/disk_cloning

              BrutalBirdieB Online
              BrutalBirdieB Online
              BrutalBirdie
              Partner
              wrote on last edited by
              #20

              @LoudLemur yes full disk images are regularly as big as the disk it self.
              So if you got a 1TB disk the Disk Image will be 1TB.
              Yes you could cut empty space which is unused.

              When a system is compromised, normally you shutdown the system, create a disk image and then format the server and setup new.
              Then this disk image can be used for later analytics.

              Like my work? Consider donating a drink. Cheers!

              humptydumptyH 1 Reply Last reply
              3
              • BrutalBirdieB BrutalBirdie

                @LoudLemur yes full disk images are regularly as big as the disk it self.
                So if you got a 1TB disk the Disk Image will be 1TB.
                Yes you could cut empty space which is unused.

                When a system is compromised, normally you shutdown the system, create a disk image and then format the server and setup new.
                Then this disk image can be used for later analytics.

                humptydumptyH Offline
                humptydumptyH Offline
                humptydumpty
                wrote on last edited by
                #21

                @BrutalBirdie on a vps, is a server snapshot the equivalent to a full disk image and can it be used for analytics?

                BrutalBirdieB 1 Reply Last reply
                1
                • humptydumptyH humptydumpty

                  @BrutalBirdie on a vps, is a server snapshot the equivalent to a full disk image and can it be used for analytics?

                  BrutalBirdieB Online
                  BrutalBirdieB Online
                  BrutalBirdie
                  Partner
                  wrote on last edited by
                  #22

                  @humptydumpty Should be.
                  If you can create a server from it or attach it to a different server, then sure.

                  Like my work? Consider donating a drink. Cheers!

                  P 1 Reply Last reply
                  1
                  • BrutalBirdieB BrutalBirdie

                    @humptydumpty Should be.
                    If you can create a server from it or attach it to a different server, then sure.

                    P Offline
                    P Offline
                    privsec
                    wrote on last edited by
                    #23

                    @BrutalBirdie You are the bomb.com

                    It might be worthwhile to write up a guide or refer to a already created guide on what to do in this exact type of an instance for future cases like this.

                    1 Reply Last reply
                    2
                    • BrutalBirdieB BrutalBirdie

                      @andreasdueren I am running all cloudron servers with root on complete lockdown.
                      This even blocks default support access for the staff, if you enabled it.

                      I also use normal ssh keys for the designated sudo user and also ed25519-sk and ecdsa-sk ssh keys for 2FA via Yubikey.
                      This works with no issues.

                      andreasduerenA Offline
                      andreasduerenA Offline
                      andreasdueren
                      wrote on last edited by
                      #24

                      @BrutalBirdie said in Our server is hacked: foreign addresses in china, finland, france etc:

                      @andreasdueren I am running all cloudron servers with root on complete lockdown.
                      This even blocks default support access for the staff, if you enabled it.
                      I also use normal ssh keys for the designated sudo user and also ed25519-sk and ecdsa-sk ssh keys for 2FA via Yubikey.
                      This works with no issues.

                      Would you mind sharing the steps you took? I'd like to try that out on a test server

                      BrutalBirdieB 1 Reply Last reply
                      0
                      • andreasduerenA andreasdueren

                        @BrutalBirdie said in Our server is hacked: foreign addresses in china, finland, france etc:

                        @andreasdueren I am running all cloudron servers with root on complete lockdown.
                        This even blocks default support access for the staff, if you enabled it.
                        I also use normal ssh keys for the designated sudo user and also ed25519-sk and ecdsa-sk ssh keys for 2FA via Yubikey.
                        This works with no issues.

                        Would you mind sharing the steps you took? I'd like to try that out on a test server

                        BrutalBirdieB Online
                        BrutalBirdieB Online
                        BrutalBirdie
                        Partner
                        wrote on last edited by BrutalBirdie
                        #25

                        @andreasdueren

                        For everyone interested we (we as in, my company and me) also offer Cloudron hosting as as a service.
                        So I can't reveal my whole hand 😉 so please be understanding ❤


                        But what you are asking about is pretty simple:

                        Create a user with sudo permissions and add your ssh public key to that user (don't lose the password for that user since you will need it for sudo)

                        I also disable all ssh access with password, since this only opens the window for brute force attempts

                        Depends on the lock down wanted, you can also disable the root login via /etc/passwd by setting the login shell to /sbin/nologin looks something like this:

                        root:x:0:0:root:/root:/sbin/nologin
                        

                        Then, even if you try a sudo su - you get this:

                        This account is currently not available.
                        

                        94fca282-560f-4d7d-bfc4-fb2c4816d6e8-image.png
                        But since you can edit the /etc/passwd with sudo access (unless you lock down the system even further) this can be a bit snake oily.


                        There is much more going on in my servers, but since we deploy everything via. Ansible I don't need to keep track of ever single detail, since its infrastructure as a code, I can just read up.
                        Login tracking, Log Tracking, Monitoring yada yada yada.

                        If a system farts, I get a message.

                        I hope this shares some insights.
                        A step by step guide on how to lock down the root user would simply be me copy pasting google searches.
                        When it's about Linux security you can do sooooo much: https://wiki.archlinux.org/title/security
                        there is also a good section on "restricting root" 😉


                        EDIT:

                        Maybe I can do a step by step guide in the forum when I got some spare time. 🙂
                        But right now its a bit late and I am lazy 💤

                        Like my work? Consider donating a drink. Cheers!

                        andreasduerenA scookeS 2 Replies Last reply
                        8
                        • BrutalBirdieB BrutalBirdie

                          @andreasdueren

                          For everyone interested we (we as in, my company and me) also offer Cloudron hosting as as a service.
                          So I can't reveal my whole hand 😉 so please be understanding ❤


                          But what you are asking about is pretty simple:

                          Create a user with sudo permissions and add your ssh public key to that user (don't lose the password for that user since you will need it for sudo)

                          I also disable all ssh access with password, since this only opens the window for brute force attempts

                          Depends on the lock down wanted, you can also disable the root login via /etc/passwd by setting the login shell to /sbin/nologin looks something like this:

                          root:x:0:0:root:/root:/sbin/nologin
                          

                          Then, even if you try a sudo su - you get this:

                          This account is currently not available.
                          

                          94fca282-560f-4d7d-bfc4-fb2c4816d6e8-image.png
                          But since you can edit the /etc/passwd with sudo access (unless you lock down the system even further) this can be a bit snake oily.


                          There is much more going on in my servers, but since we deploy everything via. Ansible I don't need to keep track of ever single detail, since its infrastructure as a code, I can just read up.
                          Login tracking, Log Tracking, Monitoring yada yada yada.

                          If a system farts, I get a message.

                          I hope this shares some insights.
                          A step by step guide on how to lock down the root user would simply be me copy pasting google searches.
                          When it's about Linux security you can do sooooo much: https://wiki.archlinux.org/title/security
                          there is also a good section on "restricting root" 😉


                          EDIT:

                          Maybe I can do a step by step guide in the forum when I got some spare time. 🙂
                          But right now its a bit late and I am lazy 💤

                          andreasduerenA Offline
                          andreasduerenA Offline
                          andreasdueren
                          wrote on last edited by
                          #26

                          @BrutalBirdie I never had password access enabled on my servers in the first place but I'm interested in locking it down a little more that's why I asked. Thank you!

                          1 Reply Last reply
                          0
                          • BrutalBirdieB BrutalBirdie

                            @andreasdueren

                            For everyone interested we (we as in, my company and me) also offer Cloudron hosting as as a service.
                            So I can't reveal my whole hand 😉 so please be understanding ❤


                            But what you are asking about is pretty simple:

                            Create a user with sudo permissions and add your ssh public key to that user (don't lose the password for that user since you will need it for sudo)

                            I also disable all ssh access with password, since this only opens the window for brute force attempts

                            Depends on the lock down wanted, you can also disable the root login via /etc/passwd by setting the login shell to /sbin/nologin looks something like this:

                            root:x:0:0:root:/root:/sbin/nologin
                            

                            Then, even if you try a sudo su - you get this:

                            This account is currently not available.
                            

                            94fca282-560f-4d7d-bfc4-fb2c4816d6e8-image.png
                            But since you can edit the /etc/passwd with sudo access (unless you lock down the system even further) this can be a bit snake oily.


                            There is much more going on in my servers, but since we deploy everything via. Ansible I don't need to keep track of ever single detail, since its infrastructure as a code, I can just read up.
                            Login tracking, Log Tracking, Monitoring yada yada yada.

                            If a system farts, I get a message.

                            I hope this shares some insights.
                            A step by step guide on how to lock down the root user would simply be me copy pasting google searches.
                            When it's about Linux security you can do sooooo much: https://wiki.archlinux.org/title/security
                            there is also a good section on "restricting root" 😉


                            EDIT:

                            Maybe I can do a step by step guide in the forum when I got some spare time. 🙂
                            But right now its a bit late and I am lazy 💤

                            scookeS Offline
                            scookeS Offline
                            scooke
                            wrote on last edited by scooke
                            #27

                            @BrutalBirdie said in Our server is hacked: foreign addresses in china, finland, france etc:

                            step by step guide in the forum when I got some spare time.

                            I don't think you "need" to do this. There are sooo many tutorials out there, easily findable, about how to secure and lockdown a server. What you described is even the most base-level steps, but so many people don't even do that! All anyone has to do is google those terms, "secure and lock down a server" and then choose the most reliable results. Anyone who needs this can find the info and put the steps into place way before you will find time to do a write-up.

                            A life lived in fear is a life half-lived

                            andreasduerenA 1 Reply Last reply
                            1
                            • scookeS scooke

                              @BrutalBirdie said in Our server is hacked: foreign addresses in china, finland, france etc:

                              step by step guide in the forum when I got some spare time.

                              I don't think you "need" to do this. There are sooo many tutorials out there, easily findable, about how to secure and lockdown a server. What you described is even the most base-level steps, but so many people don't even do that! All anyone has to do is google those terms, "secure and lock down a server" and then choose the most reliable results. Anyone who needs this can find the info and put the steps into place way before you will find time to do a write-up.

                              andreasduerenA Offline
                              andreasduerenA Offline
                              andreasdueren
                              wrote on last edited by
                              #28

                              @scooke I'm not so much concerned as to achieve hardened security on my server but more not having those measure interfere with cloudron and create problems. For example I would like to add 2FA with Yubikey but that involves installing packages which we are discouraged from doing. That's why I asked for his setup.

                              scookeS 1 Reply Last reply
                              2
                              • andreasduerenA andreasdueren

                                @scooke I'm not so much concerned as to achieve hardened security on my server but more not having those measure interfere with cloudron and create problems. For example I would like to add 2FA with Yubikey but that involves installing packages which we are discouraged from doing. That's why I asked for his setup.

                                scookeS Offline
                                scookeS Offline
                                scooke
                                wrote on last edited by
                                #29

                                @andreasdueren I'd be cautious about implementing it then. Cloudron hardens your server enough - doing more by installing more software, which is NOT recommended, will only lead to problems, especially if you don't already have a deep enough understanding of what is happening. It seems to be that @BrutalBirdie's gang knows their stuff (they're using Ansible to install Cloudron??? Yeah, that is next level coding there). Of course, they may also be paying for the Enterprise level of service (I'm not asking btw, no need to respond to that @BrutalBirdie ) so if they have hassles then I suppose it's fine for them to get help beyond typical Cloudron support, especially if they are doing more to their servers than what Cloudron themselves advise.

                                A life lived in fear is a life half-lived

                                1 Reply Last reply
                                1
                                • girishG girish marked this topic as a question on
                                • girishG girish has marked this topic as solved on
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Bookmarks
                                  • Search