pwn 0.5.310 → 0.5.311
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/pwn/plugins/transparent_browser.rb +43 -19
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf124a838b0f13e7e6e2ac3d13d354fd885c07f7c71c24e05134cf33dd66ba10
|
4
|
+
data.tar.gz: 0e4413b5365adadf3d7fc688ccf372d6caf8145ba8876bb0c6d65b6145048279
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caf9d4f9fd676258b3405562f9ece2e85cfedcce57e83360e4b536ab2222c25487ccf19c82d19d3a26f07311d8f635222c9ffd765404cbda42d357593ddbbd18
|
7
|
+
data.tar.gz: 5ff6987e379badb54018ea566e5f288188a7e99e3c40d6fc27b13189cdde1eb9e5d45a42d4b2b510cacb270ee79c0465a21f014903671b317164fb650bb3c3df
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
|
|
37
37
|
$ ./install.sh
|
38
38
|
$ ./install.sh ruby-gem
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.5.
|
40
|
+
pwn[v0.5.311]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.4.4@pwn
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
53
53
|
$ gem install --verbose pwn
|
54
54
|
$ pwn
|
55
|
-
pwn[v0.5.
|
55
|
+
pwn[v0.5.311]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
If you're using a multi-user install of RVM do:
|
@@ -62,7 +62,7 @@ $ rvm use ruby-3.4.4@pwn
|
|
62
62
|
$ rvmsudo gem uninstall --all --executables pwn
|
63
63
|
$ rvmsudo gem install --verbose pwn
|
64
64
|
$ pwn
|
65
|
-
pwn[v0.5.
|
65
|
+
pwn[v0.5.311]:001 >>> PWN.help
|
66
66
|
```
|
67
67
|
|
68
68
|
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
|
@@ -537,16 +537,20 @@ module PWN
|
|
537
537
|
console.log(`Mutation ${index + 1}:`, mutation.type);
|
538
538
|
|
539
539
|
if (mutation.type === 'childList') {
|
540
|
-
// Log added or removed nodes
|
541
540
|
if (mutation.addedNodes.length) {
|
542
541
|
mutation.addedNodes.forEach((node) => {
|
543
542
|
if (node.nodeType === Node.ELEMENT_NODE) {
|
544
|
-
|
543
|
+
let logObj = {
|
545
544
|
tagName: node.tagName,
|
546
545
|
id: node.id || 'N/A',
|
547
546
|
classList: node.className || 'N/A',
|
548
547
|
outerHTML: node.outerHTML,
|
549
|
-
}
|
548
|
+
};
|
549
|
+
if (['SCRIPT', 'IFRAME', 'FRAME', 'OBJECT', 'EMBED', 'APPLET'].includes(node.tagName)) {
|
550
|
+
console.warn('Potential XSS sink: Added', node.tagName, logObj);
|
551
|
+
} else {
|
552
|
+
console.log('Added Element:', logObj);
|
553
|
+
}
|
550
554
|
} else if (node.nodeType === Node.TEXT_NODE) {
|
551
555
|
console.log('Added Text Node:', {
|
552
556
|
textContent: node.textContent,
|
@@ -573,23 +577,43 @@ module PWN
|
|
573
577
|
});
|
574
578
|
}
|
575
579
|
} else if (mutation.type === 'attributes') {
|
576
|
-
|
577
|
-
console.log(`Attribute "${mutation.attributeName}" modified on`, {
|
580
|
+
let logObj = {
|
578
581
|
element: mutation.target.tagName,
|
579
582
|
id: mutation.target.id || 'N/A',
|
583
|
+
attribute: mutation.attributeName,
|
580
584
|
oldValue: mutation.oldValue,
|
581
585
|
newValue: mutation.target.getAttribute(mutation.attributeName),
|
582
586
|
outerHTML: mutation.target.outerHTML,
|
583
|
-
}
|
587
|
+
};
|
588
|
+
if (
|
589
|
+
(mutation.attributeName === 'src' && ['SCRIPT', 'IFRAME', 'FRAME', 'OBJECT', 'EMBED'].includes(mutation.target.tagName)) ||
|
590
|
+
(mutation.attributeName === 'href' && ['A', 'AREA', 'LINK'].includes(mutation.target.tagName)) ||
|
591
|
+
(mutation.attributeName === 'action' && mutation.target.tagName === 'FORM') ||
|
592
|
+
mutation.attributeName.startsWith('on') ||
|
593
|
+
(mutation.attributeName === 'srcdoc' && mutation.target.tagName === 'IFRAME') ||
|
594
|
+
(mutation.attributeName === 'data' && mutation.target.tagName === 'OBJECT') ||
|
595
|
+
(mutation.attributeName === 'codebase' && mutation.target.tagName === 'OBJECT')
|
596
|
+
) {
|
597
|
+
console.warn('Potential XSS sink: Attribute change', logObj);
|
598
|
+
} else {
|
599
|
+
console.log('Attribute changed:', logObj);
|
600
|
+
}
|
584
601
|
} else if (mutation.type === 'characterData') {
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
602
|
+
if (mutation.target.parentElement && mutation.target.parentElement.tagName === 'SCRIPT') {
|
603
|
+
console.warn('Potential XSS sink: Script content changed', {
|
604
|
+
scriptId: mutation.target.parentElement.id || 'N/A',
|
605
|
+
oldValue: mutation.oldValue,
|
606
|
+
newValue: mutation.target.textContent,
|
607
|
+
});
|
608
|
+
} else {
|
609
|
+
console.log('Text Content Changed:', {
|
610
|
+
element: mutation.target.parentElement?.tagName || 'N/A',
|
611
|
+
id: mutation.target.parentElement?.id || 'N/A',
|
612
|
+
oldValue: mutation.oldValue,
|
613
|
+
newValue: mutation.target.textContent,
|
614
|
+
innerHTML: mutation.target.parentElement?.innerHTML || 'N/A',
|
615
|
+
});
|
616
|
+
}
|
593
617
|
}
|
594
618
|
});
|
595
619
|
console.groupEnd();
|
@@ -618,7 +642,7 @@ module PWN
|
|
618
642
|
document.addEventListener('click', logUserInteraction); // For clicks
|
619
643
|
|
620
644
|
// Function to stop the observer (run in console when needed)
|
621
|
-
window.
|
645
|
+
window.hide_dom_mutations = () => {
|
622
646
|
observer.disconnect();
|
623
647
|
document.removeEventListener('input', logUserInteraction);
|
624
648
|
document.removeEventListener('click', logUserInteraction);
|
@@ -626,7 +650,7 @@ module PWN
|
|
626
650
|
};
|
627
651
|
|
628
652
|
// Log instructions to console
|
629
|
-
console.log('MutationObserver started. To stop, run:
|
653
|
+
console.log('MutationObserver started. To stop, run: hide_dom_mutations()');
|
630
654
|
JAVASCRIPT
|
631
655
|
|
632
656
|
console(browser_obj: browser_obj, js: 'clear();')
|
@@ -651,11 +675,11 @@ module PWN
|
|
651
675
|
)
|
652
676
|
|
653
677
|
js = <<~JAVASCRIPT
|
654
|
-
if (typeof
|
655
|
-
|
678
|
+
if (typeof hide_dom_mutations === 'function') {
|
679
|
+
hide_dom_mutations();
|
656
680
|
console.log('DOM mutation observer and event listeners disabled.');
|
657
681
|
} else {
|
658
|
-
console.log('Error:
|
682
|
+
console.log('Error: hide_dom_mutations function not found. DOM mutation observer was not active.');
|
659
683
|
}
|
660
684
|
JAVASCRIPT
|
661
685
|
|
data/lib/pwn/version.rb
CHANGED