Wireless Communications and Mobile Computing / 2018 / Article / Alg 1

Research Article

Hydra-Bite: Static Taint Immunity, Split, and Complot Based Information Capture Method for Android Device

Algorithm 1

Main loop of key information split.
(1)define sApiList <apiMap<api_Name, perm_Name >>:
List<Map<String, String>>
(2)define kPermList <permMap<perm_Name, flag>>:
List<Map<String, String>>
(3)while sApiList ≠ ∅ do
(4)for    to sApiList.size()
//Traversing list of key-value mappings for sensitive APIs
(5)map sApiList.get(i).getKey() to perm via the Mapping file
provided by Pscout
//Mapping sensitive APIs to permissions corresponded
(6)sApiList.get(i).getValue()←perm
(7)if perm is the first time show then
//Remove the duplicate permissions after the mapping
(8)swich(perm)
//Classify permissions before add them into the second key-value mapping
(9)case perm is transfer class permission:
(10)permMap.getKey() ← perm
(11)permMap.getValue() ←  trans
(12)add Map2 to kPList
(13)clear Map2
(14)case perm is information read class permission:
(15)permMap.getKey()←perm
(16)permMap.getValue()← read
(17)add Map2 to kPList
(18)clear Map2
(19)case perm is other permission:
(20)drop perm
(21)else
(22)drop perm
(23)end if
(24)end for
(25)end while