Analysis

  • max time kernel
    115s
  • max time network
    151s
  • platform
    debian-9_mipsel
  • resource
    debian9-mipsel-20230831-en
  • resource tags

    arch:mipselimage:debian9-mipsel-20230831-enkernel:4.9.0-13-4kc-maltalocale:en-usos:debian-9-mipselsystem
  • submitted
    12-10-2023 14:02

General

  • Target

    bin.sh

  • Size

    134KB

  • MD5

    3849f30b51a5c49e8d1546960cc206c7

  • SHA1

    61c74136534b826059c63221a2373dc0613a47b7

  • SHA256

    f6c97b1e2ed02578ca1066c8235ba4f991e645f89012406c639dbccc6582eec8

  • SHA512

    43d79293d1fbf716111c27e50df95a0860a0d706079625fa2b8a6b57c5ee06fa7b5b6b8c0acae33714a2181686426728513c990534e44b6f03a05dde0629ab86

  • SSDEEP

    3072:biMYFJvw6Yh0b1gKobtCGCmCRlrisfrYm:fYFJvwe1gKCYVl2szN

Malware Config

Signatures

  • Contacts a large (10240) amount of remote hosts 1 TTPs

    This may indicate a network scan to discover remotely running services.

  • Patched UPX-packed file 1 IoCs

    Sample is packed with UPX but required header fields are zeroed out to prevent unpacking with the default UPX tool.

  • Changes its process name 1 IoCs
  • Modifies Watchdog functionality 1 TTPs 2 IoCs

    Malware like Mirai modifies the Watchdog to prevent it restarting an infected system.

  • UPX packed file 1 IoCs

    Detects executables packed with UPX/modified UPX open source packer.

  • Creates a large amount of network flows 1 TTPs

    This may indicate a network scan to discover remotely running services.

  • Enumerates active TCP sockets 1 TTPs 1 IoCs

    Gets active TCP sockets from /proc virtual filesystem.

  • Modifies init.d 1 TTPs 2 IoCs

    Adds/modifies system service, likely for persistence.

  • Reads system routing table 1 TTPs 1 IoCs

    Gets active network interfaces from /proc virtual filesystem.

  • Writes file to system bin folder 1 TTPs 2 IoCs
  • Reads system network configuration 1 TTPs 3 IoCs

    Uses contents of /proc filesystem to enumerate network settings.

  • Reads runtime system information 2 IoCs

    Reads data from /proc virtual filesystem.

  • Writes file to tmp directory 2 IoCs

    Malware often drops required files in the /tmp directory.

Processes

  • /tmp/bin.sh
    /tmp/bin.sh
    1⤵
    • Enumerates active TCP sockets
    • Reads system network configuration
    • Reads runtime system information
    • Writes file to tmp directory
    PID:345
  • /bin/sh
    sh -c "killall -9 telnetd utelnetd scfgmgr"
    1⤵
      PID:349
    • /bin/sh
      sh -c "iptables -I INPUT -p tcp --destination-port 52961 -j ACCEPT"
      1⤵
        PID:360
        • /sbin/iptables
          iptables -I INPUT -p tcp --destination-port 52961 -j ACCEPT
          2⤵
            PID:361
        • /bin/sh
          sh -c "iptables -I OUTPUT -p tcp --source-port 52961 -j ACCEPT"
          1⤵
            PID:367
            • /sbin/iptables
              iptables -I OUTPUT -p tcp --source-port 52961 -j ACCEPT
              2⤵
                PID:369
            • /bin/sh
              sh -c "iptables -I INPUT -p tcp --destination-port 22 -j DROP"
              1⤵
                PID:370
                • /sbin/iptables
                  iptables -I INPUT -p tcp --destination-port 22 -j DROP
                  2⤵
                    PID:372
                • /bin/sh
                  sh -c "iptables -I PREROUTING -t nat -p tcp --destination-port 52961 -j ACCEPT"
                  1⤵
                    PID:371
                    • /sbin/iptables
                      iptables -I PREROUTING -t nat -p tcp --destination-port 52961 -j ACCEPT
                      2⤵
                        PID:373
                    • /bin/sh
                      sh -c "iptables -I INPUT -p tcp --destination-port 23 -j DROP"
                      1⤵
                        PID:374
                        • /sbin/iptables
                          iptables -I INPUT -p tcp --destination-port 23 -j DROP
                          2⤵
                            PID:376
                        • /bin/sh
                          sh -c "iptables -I POSTROUTING -t nat -p tcp --source-port 52961 -j ACCEPT"
                          1⤵
                            PID:384
                            • /sbin/iptables
                              iptables -I POSTROUTING -t nat -p tcp --source-port 52961 -j ACCEPT
                              2⤵
                                PID:385
                            • /bin/sh
                              sh -c "iptables -I INPUT -p tcp --destination-port 2323 -j DROP"
                              1⤵
                                PID:386
                                • /sbin/iptables
                                  iptables -I INPUT -p tcp --destination-port 2323 -j DROP
                                  2⤵
                                    PID:387
                                • /bin/sh
                                  sh -c "iptables -I INPUT -p tcp --dport 52961 -j ACCEPT"
                                  1⤵
                                    PID:388
                                    • /sbin/iptables
                                      iptables -I INPUT -p tcp --dport 52961 -j ACCEPT
                                      2⤵
                                        PID:389
                                    • /bin/sh
                                      sh -c "iptables -I OUTPUT -p tcp --source-port 22 -j DROP"
                                      1⤵
                                        PID:390
                                        • /sbin/iptables
                                          iptables -I OUTPUT -p tcp --source-port 22 -j DROP
                                          2⤵
                                            PID:391
                                        • /bin/sh
                                          sh -c "iptables -I OUTPUT -p tcp --sport 52961 -j ACCEPT"
                                          1⤵
                                            PID:392
                                            • /sbin/iptables
                                              iptables -I OUTPUT -p tcp --sport 52961 -j ACCEPT
                                              2⤵
                                                PID:393
                                            • /bin/sh
                                              sh -c "iptables -I OUTPUT -p tcp --source-port 23 -j DROP"
                                              1⤵
                                                PID:394
                                                • /sbin/iptables
                                                  iptables -I OUTPUT -p tcp --source-port 23 -j DROP
                                                  2⤵
                                                    PID:395
                                                • /bin/sh
                                                  sh -c "iptables -I PREROUTING -t nat -p tcp --dport 52961 -j ACCEPT"
                                                  1⤵
                                                    PID:399
                                                    • /sbin/iptables
                                                      iptables -I PREROUTING -t nat -p tcp --dport 52961 -j ACCEPT
                                                      2⤵
                                                        PID:400
                                                    • /bin/sh
                                                      sh -c "iptables -I OUTPUT -p tcp --source-port 2323 -j DROP"
                                                      1⤵
                                                        PID:401
                                                        • /sbin/iptables
                                                          iptables -I OUTPUT -p tcp --source-port 2323 -j DROP
                                                          2⤵
                                                            PID:402
                                                        • /bin/sh
                                                          sh -c "iptables -I POSTROUTING -t nat -p tcp --sport 52961 -j ACCEPT"
                                                          1⤵
                                                            PID:403
                                                            • /sbin/iptables
                                                              iptables -I POSTROUTING -t nat -p tcp --sport 52961 -j ACCEPT
                                                              2⤵
                                                                PID:404
                                                            • /bin/sh
                                                              sh -c "iptables -I INPUT -p tcp --dport 22 -j DROP"
                                                              1⤵
                                                                PID:405
                                                                • /sbin/iptables
                                                                  iptables -I INPUT -p tcp --dport 22 -j DROP
                                                                  2⤵
                                                                    PID:406
                                                                • /bin/sh
                                                                  sh -c "iptables -I INPUT -p tcp --dport 23 -j DROP"
                                                                  1⤵
                                                                    PID:407
                                                                    • /sbin/iptables
                                                                      iptables -I INPUT -p tcp --dport 23 -j DROP
                                                                      2⤵
                                                                        PID:408
                                                                    • /bin/sh
                                                                      sh -c "iptables -I INPUT -p tcp --dport 2323 -j DROP"
                                                                      1⤵
                                                                        PID:409
                                                                        • /sbin/iptables
                                                                          iptables -I INPUT -p tcp --dport 2323 -j DROP
                                                                          2⤵
                                                                            PID:410
                                                                        • /bin/sh
                                                                          sh -c "iptables -I OUTPUT -p tcp --sport 22 -j DROP"
                                                                          1⤵
                                                                            PID:411
                                                                            • /sbin/iptables
                                                                              iptables -I OUTPUT -p tcp --sport 22 -j DROP
                                                                              2⤵
                                                                                PID:412
                                                                            • /bin/sh
                                                                              sh -c "iptables -I OUTPUT -p tcp --sport 23 -j DROP"
                                                                              1⤵
                                                                                PID:413
                                                                                • /sbin/iptables
                                                                                  iptables -I OUTPUT -p tcp --sport 23 -j DROP
                                                                                  2⤵
                                                                                    PID:414
                                                                                • /bin/sh
                                                                                  sh -c "iptables -I OUTPUT -p tcp --sport 2323 -j DROP"
                                                                                  1⤵
                                                                                    PID:415
                                                                                    • /sbin/iptables
                                                                                      iptables -I OUTPUT -p tcp --sport 2323 -j DROP
                                                                                      2⤵
                                                                                        PID:416
                                                                                    • /bin/sh
                                                                                      sh -c "iptables -I INPUT -p tcp --destination-port 58000 -j DROP"
                                                                                      1⤵
                                                                                        PID:417
                                                                                        • /sbin/iptables
                                                                                          iptables -I INPUT -p tcp --destination-port 58000 -j DROP
                                                                                          2⤵
                                                                                            PID:419
                                                                                        • /bin/sh
                                                                                          sh -c "iptables -I OUTPUT -p tcp --source-port 58000 -j DROP"
                                                                                          1⤵
                                                                                            PID:420
                                                                                            • /sbin/iptables
                                                                                              iptables -I OUTPUT -p tcp --source-port 58000 -j DROP
                                                                                              2⤵
                                                                                                PID:421
                                                                                            • /bin/sh
                                                                                              sh -c "iptables -I INPUT -p tcp --dport 58000 -j DROP"
                                                                                              1⤵
                                                                                                PID:422
                                                                                                • /sbin/iptables
                                                                                                  iptables -I INPUT -p tcp --dport 58000 -j DROP
                                                                                                  2⤵
                                                                                                    PID:423
                                                                                                • /bin/sh
                                                                                                  sh -c "iptables -I OUTPUT -p tcp --sport 58000 -j DROP"
                                                                                                  1⤵
                                                                                                    PID:424
                                                                                                    • /sbin/iptables
                                                                                                      iptables -I OUTPUT -p tcp --sport 58000 -j DROP
                                                                                                      2⤵
                                                                                                        PID:425
                                                                                                    • /bin/sh
                                                                                                      sh -c "cfgtool set /mnt/jffs2/hw_ctree.xml InternetGatewayDevice.ManagementServer URL \"http://127.0.0.1\""
                                                                                                      1⤵
                                                                                                        PID:426
                                                                                                      • /bin/sh
                                                                                                        sh -c "cfgtool set /mnt/jffs2/hw_ctree.xml InternetGatewayDevice.ManagementServer ConnectionRequestPassword \"acsMozi\""
                                                                                                        1⤵
                                                                                                          PID:427
                                                                                                        • /bin/sh
                                                                                                          sh -c "iptables -I INPUT -p tcp --destination-port 35000 -j DROP"
                                                                                                          1⤵
                                                                                                            PID:428
                                                                                                            • /sbin/iptables
                                                                                                              iptables -I INPUT -p tcp --destination-port 35000 -j DROP
                                                                                                              2⤵
                                                                                                                PID:429
                                                                                                            • /bin/sh
                                                                                                              sh -c "iptables -I INPUT -p tcp --destination-port 50023 -j DROP"
                                                                                                              1⤵
                                                                                                                PID:430
                                                                                                                • /sbin/iptables
                                                                                                                  iptables -I INPUT -p tcp --destination-port 50023 -j DROP
                                                                                                                  2⤵
                                                                                                                    PID:431
                                                                                                                • /bin/sh
                                                                                                                  sh -c "iptables -I OUTPUT -p tcp --source-port 50023 -j DROP"
                                                                                                                  1⤵
                                                                                                                    PID:432
                                                                                                                    • /sbin/iptables
                                                                                                                      iptables -I OUTPUT -p tcp --source-port 50023 -j DROP
                                                                                                                      2⤵
                                                                                                                        PID:433
                                                                                                                    • /bin/sh
                                                                                                                      sh -c "iptables -I OUTPUT -p tcp --source-port 35000 -j DROP"
                                                                                                                      1⤵
                                                                                                                        PID:435
                                                                                                                        • /sbin/iptables
                                                                                                                          iptables -I OUTPUT -p tcp --source-port 35000 -j DROP
                                                                                                                          2⤵
                                                                                                                            PID:436
                                                                                                                        • /bin/sh
                                                                                                                          sh -c "iptables -I INPUT -p tcp --destination-port 7547 -j DROP"
                                                                                                                          1⤵
                                                                                                                            PID:437
                                                                                                                            • /sbin/iptables
                                                                                                                              iptables -I INPUT -p tcp --destination-port 7547 -j DROP
                                                                                                                              2⤵
                                                                                                                                PID:439
                                                                                                                            • /bin/sh
                                                                                                                              sh -c "iptables -I OUTPUT -p tcp --source-port 7547 -j DROP"
                                                                                                                              1⤵
                                                                                                                                PID:440
                                                                                                                                • /sbin/iptables
                                                                                                                                  iptables -I OUTPUT -p tcp --source-port 7547 -j DROP
                                                                                                                                  2⤵
                                                                                                                                    PID:441
                                                                                                                                • /bin/sh
                                                                                                                                  sh -c "iptables -I INPUT -p tcp --dport 35000 -j DROP"
                                                                                                                                  1⤵
                                                                                                                                    PID:442
                                                                                                                                    • /sbin/iptables
                                                                                                                                      iptables -I INPUT -p tcp --dport 35000 -j DROP
                                                                                                                                      2⤵
                                                                                                                                        PID:443
                                                                                                                                    • /bin/sh
                                                                                                                                      sh -c "iptables -I INPUT -p tcp --dport 50023 -j DROP"
                                                                                                                                      1⤵
                                                                                                                                        PID:444
                                                                                                                                        • /sbin/iptables
                                                                                                                                          iptables -I INPUT -p tcp --dport 50023 -j DROP
                                                                                                                                          2⤵
                                                                                                                                            PID:445
                                                                                                                                        • /bin/sh
                                                                                                                                          sh -c "iptables -I OUTPUT -p tcp --sport 50023 -j DROP"
                                                                                                                                          1⤵
                                                                                                                                            PID:446
                                                                                                                                            • /sbin/iptables
                                                                                                                                              iptables -I OUTPUT -p tcp --sport 50023 -j DROP
                                                                                                                                              2⤵
                                                                                                                                                PID:447
                                                                                                                                            • /bin/sh
                                                                                                                                              sh -c "iptables -I OUTPUT -p tcp --sport 35000 -j DROP"
                                                                                                                                              1⤵
                                                                                                                                                PID:448
                                                                                                                                                • /sbin/iptables
                                                                                                                                                  iptables -I OUTPUT -p tcp --sport 35000 -j DROP
                                                                                                                                                  2⤵
                                                                                                                                                    PID:449
                                                                                                                                                • /bin/sh
                                                                                                                                                  sh -c "iptables -I INPUT -p tcp --dport 7547 -j DROP"
                                                                                                                                                  1⤵
                                                                                                                                                    PID:450
                                                                                                                                                    • /sbin/iptables
                                                                                                                                                      iptables -I INPUT -p tcp --dport 7547 -j DROP
                                                                                                                                                      2⤵
                                                                                                                                                        PID:451
                                                                                                                                                    • /bin/sh
                                                                                                                                                      sh -c "iptables -I OUTPUT -p tcp --sport 7547 -j DROP"
                                                                                                                                                      1⤵
                                                                                                                                                        PID:452
                                                                                                                                                        • /sbin/iptables
                                                                                                                                                          iptables -I OUTPUT -p tcp --sport 7547 -j DROP
                                                                                                                                                          2⤵
                                                                                                                                                            PID:453
                                                                                                                                                        • /bin/sh
                                                                                                                                                          sh -c "iptables -I INPUT -p udp --destination-port 8000 -j ACCEPT"
                                                                                                                                                          1⤵
                                                                                                                                                            PID:454
                                                                                                                                                            • /sbin/iptables
                                                                                                                                                              iptables -I INPUT -p udp --destination-port 8000 -j ACCEPT
                                                                                                                                                              2⤵
                                                                                                                                                                PID:455
                                                                                                                                                            • /bin/sh
                                                                                                                                                              sh -c "iptables -I OUTPUT -p udp --source-port 8000 -j ACCEPT"
                                                                                                                                                              1⤵
                                                                                                                                                                PID:456
                                                                                                                                                                • /sbin/iptables
                                                                                                                                                                  iptables -I OUTPUT -p udp --source-port 8000 -j ACCEPT
                                                                                                                                                                  2⤵
                                                                                                                                                                    PID:457
                                                                                                                                                                • /bin/sh
                                                                                                                                                                  sh -c "iptables -I PREROUTING -t nat -p udp --destination-port 8000 -j ACCEPT"
                                                                                                                                                                  1⤵
                                                                                                                                                                    PID:458
                                                                                                                                                                    • /sbin/iptables
                                                                                                                                                                      iptables -I PREROUTING -t nat -p udp --destination-port 8000 -j ACCEPT
                                                                                                                                                                      2⤵
                                                                                                                                                                        PID:459
                                                                                                                                                                    • /bin/sh
                                                                                                                                                                      sh -c "iptables -I POSTROUTING -t nat -p udp --source-port 8000 -j ACCEPT"
                                                                                                                                                                      1⤵
                                                                                                                                                                        PID:460
                                                                                                                                                                        • /sbin/iptables
                                                                                                                                                                          iptables -I POSTROUTING -t nat -p udp --source-port 8000 -j ACCEPT
                                                                                                                                                                          2⤵
                                                                                                                                                                            PID:461
                                                                                                                                                                        • /bin/sh
                                                                                                                                                                          sh -c "iptables -I INPUT -p udp --dport 8000 -j ACCEPT"
                                                                                                                                                                          1⤵
                                                                                                                                                                            PID:462
                                                                                                                                                                            • /sbin/iptables
                                                                                                                                                                              iptables -I INPUT -p udp --dport 8000 -j ACCEPT
                                                                                                                                                                              2⤵
                                                                                                                                                                                PID:463
                                                                                                                                                                            • /bin/sh
                                                                                                                                                                              sh -c "iptables -I OUTPUT -p udp --sport 8000 -j ACCEPT"
                                                                                                                                                                              1⤵
                                                                                                                                                                                PID:464
                                                                                                                                                                                • /sbin/iptables
                                                                                                                                                                                  iptables -I OUTPUT -p udp --sport 8000 -j ACCEPT
                                                                                                                                                                                  2⤵
                                                                                                                                                                                    PID:465
                                                                                                                                                                                • /bin/sh
                                                                                                                                                                                  sh -c "iptables -I PREROUTING -t nat -p udp --dport 8000 -j ACCEPT"
                                                                                                                                                                                  1⤵
                                                                                                                                                                                    PID:466
                                                                                                                                                                                    • /sbin/iptables
                                                                                                                                                                                      iptables -I PREROUTING -t nat -p udp --dport 8000 -j ACCEPT
                                                                                                                                                                                      2⤵
                                                                                                                                                                                        PID:467
                                                                                                                                                                                    • /bin/sh
                                                                                                                                                                                      sh -c "iptables -I POSTROUTING -t nat -p udp --sport 8000 -j ACCEPT"
                                                                                                                                                                                      1⤵
                                                                                                                                                                                        PID:468
                                                                                                                                                                                        • /sbin/iptables
                                                                                                                                                                                          iptables -I POSTROUTING -t nat -p udp --sport 8000 -j ACCEPT
                                                                                                                                                                                          2⤵
                                                                                                                                                                                            PID:469

                                                                                                                                                                                        Network

                                                                                                                                                                                        MITRE ATT&CK Matrix ATT&CK v13

                                                                                                                                                                                        Persistence

                                                                                                                                                                                        Boot or Logon Autostart Execution

                                                                                                                                                                                        1
                                                                                                                                                                                        T1547

                                                                                                                                                                                        Hijack Execution Flow

                                                                                                                                                                                        1
                                                                                                                                                                                        T1574

                                                                                                                                                                                        Privilege Escalation

                                                                                                                                                                                        Boot or Logon Autostart Execution

                                                                                                                                                                                        1
                                                                                                                                                                                        T1547

                                                                                                                                                                                        Hijack Execution Flow

                                                                                                                                                                                        1
                                                                                                                                                                                        T1574

                                                                                                                                                                                        Defense Evasion

                                                                                                                                                                                        Impair Defenses

                                                                                                                                                                                        1
                                                                                                                                                                                        T1562

                                                                                                                                                                                        Hijack Execution Flow

                                                                                                                                                                                        1
                                                                                                                                                                                        T1574

                                                                                                                                                                                        Discovery

                                                                                                                                                                                        Network Service Discovery

                                                                                                                                                                                        2
                                                                                                                                                                                        T1046

                                                                                                                                                                                        System Network Connections Discovery

                                                                                                                                                                                        1
                                                                                                                                                                                        T1049

                                                                                                                                                                                        System Network Configuration Discovery

                                                                                                                                                                                        2
                                                                                                                                                                                        T1016

                                                                                                                                                                                        Replay Monitor

                                                                                                                                                                                        Loading Replay Monitor...

                                                                                                                                                                                        Downloads

                                                                                                                                                                                        • /etc/rcS.d/S95baby.sh
                                                                                                                                                                                          Filesize

                                                                                                                                                                                          25B

                                                                                                                                                                                          MD5

                                                                                                                                                                                          1b3235ba10fc04836c941d3d27301956

                                                                                                                                                                                          SHA1

                                                                                                                                                                                          8909655763143702430b8c58b3ae3b04cfd3a29c

                                                                                                                                                                                          SHA256

                                                                                                                                                                                          01ba1fb41632594997a41d0c3a911ae5b3034d566ebb991ef76ad76e6f9e283a

                                                                                                                                                                                          SHA512

                                                                                                                                                                                          98bdb5c266222ccbd63b6f80c87e501c8033dc53b0513d300b8da50e39a207a0b69f8cd3ecc4a128dec340a1186779fedd1049c9b0a70e90d2cb3ae6ebfa4c4d

                                                                                                                                                                                        • /tmp/.config
                                                                                                                                                                                          Filesize

                                                                                                                                                                                          140B

                                                                                                                                                                                          MD5

                                                                                                                                                                                          457412db2275c971a2f32aef0c05f0ef

                                                                                                                                                                                          SHA1

                                                                                                                                                                                          81634d651b7bd25434966cb91dd5f1f1683ae363

                                                                                                                                                                                          SHA256

                                                                                                                                                                                          348a557ecef7585e315fa04bea4a179b715c795993ca331fbaf3677c79e0be5e

                                                                                                                                                                                          SHA512

                                                                                                                                                                                          4bf11f480c43a51666b8ddb335c59159c142299995ef5aad0cabe266e9652482f3032759150d6c467494ac10e7210976a935b61642cb214a438be016a7244a2c

                                                                                                                                                                                        • /usr/networks
                                                                                                                                                                                          Filesize

                                                                                                                                                                                          134KB

                                                                                                                                                                                          MD5

                                                                                                                                                                                          3849f30b51a5c49e8d1546960cc206c7

                                                                                                                                                                                          SHA1

                                                                                                                                                                                          61c74136534b826059c63221a2373dc0613a47b7

                                                                                                                                                                                          SHA256

                                                                                                                                                                                          f6c97b1e2ed02578ca1066c8235ba4f991e645f89012406c639dbccc6582eec8

                                                                                                                                                                                          SHA512

                                                                                                                                                                                          43d79293d1fbf716111c27e50df95a0860a0d706079625fa2b8a6b57c5ee06fa7b5b6b8c0acae33714a2181686426728513c990534e44b6f03a05dde0629ab86

                                                                                                                                                                                        • memory/345-1-0x00400000-0x004c2f18-memory.dmp