Self-Improvement

[InsecureBankv2] Intent Sniffing and Injection (암시적 & 명시적) 본문

AOS/InsecureBankv2

[InsecureBankv2] Intent Sniffing and Injection (암시적 & 명시적)

JoGeun 2021. 12. 30. 13:05

Intent Sniffing and Injection

Intent에는 아래와 같이 2가지가 존재한다.

  • 암시적 Intent

특정 의도한 정보를 포함하는 Intent 객체를 생성하고 startActivity() 호출

-> 액티비티 매니저가 의도에 적합한 액티비티 정보를 패키지 매니저에게 요청

-> 패키지 매니저는 요청받은 의도에 적합한 앱에 대한 정보를 전달

-> 액티비티 매니저는 전달받은 앱의 정보를 통해 원하는 액티비티를 실행

ex1) Intent intent = new Intent(ACTION)

ex2) Intent intent = new Intent(); intent.setAction(Intent.ACTION_MAIN);

 

  • 명시적 Intent

실행하고자 하는 컴포넌트가 명확할 때 사용하는 방식

ex1) Intent intent = new Intent(getApplicationContext(), activity.class)

 

 

특히 암시적 Intent의 경우 실행하는 startActivity(intent)가 아닌 sendBroadcast(intent)인 경우에는 모든 어플리케이션으로 수행하게 된다. 그리하여 해당 intent를 Sniffing & Injection을 할 수 있다.

 

Drozer

run app.broadcast.sniff --action "theBroadcast