@monkee@other.li I'm glad you appreciate that! It took quite a bit of extra work, but I thought it would be worth it
hazelnoot@enby.life
Beiträge
-
currently just an experiment, but I plan to submit a PR when it's working -
currently just an experiment, but I plan to submit a PR when it's workingcurrently just an experiment, but I plan to submit a PR when it's working
-
this is definitely not PCI compliant @monkee@other.li and not even over TLS - plaintext SMTP
-
this is definitely not PCI compliant @monkee@other.li they did
-
this is definitely not PCI compliant this is definitely not PCI compliant
-
federation check (3/?)federation check (3/?)
RE: https://enby.life/notes/a447t7up2v -
federation check (2/?)federation check (2/?)
RE: https://enby.life/notes/a43iwz74lt -
Almost everything on this list assumes a healthy, financially-secure person with plenty of free time and access to high-quality goods.@alice@mk.nyaa.place yeah great point! Like I would love to grow a vegetable garden, and I was actually really good at it as a kid. But back then I had parents to balance out the ADHD and remind me to tend them. Now? I'd just forget and they'd all die, and I'd feel awful about it forever.
-
Almost everything on this list assumes a healthy, financially-secure person with plenty of free time and access to high-quality goods.Almost everything on this list assumes a healthy, financially-secure person with plenty of free time and access to high-quality goods. And "realize that you can be happy without money" is such a bullshit thing to say after listing a whole bunch of examples that require money!
RE: https://kolektiva.social/users/nogodsnomasters/statuses/113957764192407834 -
#Sharkey #Support@natty@astolfo.social @monkee@other.li @monkee@forum.other.li This is actually a well-known problem with ActivityPub, which is why all decent implementations have a filter for private IP ranges.
-
#Sharkey #Support@natty@astolfo.social @monkee@other.li @monkee@forum.other.li sorry I forgot the word lol
-
#Sharkey #Support@natty@astolfo.social @monkee@other.li @monkee@forum.other.li yes, it's a type of SSRF
-
#Sharkey #Support@monkee@other.li @monkee@forum.other.li there's also a related attack that allows an attacker to make
POST
requests to a private IP range, but it's substantially harder to pull off and is unlikely to work except in contrived cases. I'm not even sure how to write an example for it. -
#Sharkey #Support@monkee@other.li @monkee@forum.other.li Sorry, I'm not great at explaining things. Let me lay it out like this, maybe it will make more sense:
- Alice (victim) has an instancealice.com
. Located on the same machine is her personal file store, which has a web interface. The web interface is unauthenticated, so it listens onhttp://localhost:8080
and a reverse-proxy handles authentication.
- Mal (attacker) wants access to Alice's files. She already has an instancemal.com
, so she adds a DNS A record forevil.mal.com
which resolves to127.0.0.1
.
- Mal sends an ActivityPubCreate(Note)
activity tohttps://alice.com/inbox
, making sure to include a media attachment with URLhttp://evil.mal.com:8080/api/list-files
.
- Alice's instance processes the activity and finds the attachment URL. The media proxy component takes the media URL and resolves the domain, checking the returned127.0.0.1
against the value ofallowedPrivateAddresses
. This check passes because127.0.0.1/32
is included in the list, so media proxy makes aGET
request tohttp://127.0.0.1:8080/api/list-files
. This of course hits the API endpoint, returning some JSON with the file index. No authentication is required because this bypasses the reverse-proxy.
- The media server reads theContent-Type
header and determines thatapplication/json
should be attached as a binary file, thus preserving it unmodified. The JSON is copied to Sharkey's local file store and given a UUID. The saved API response is then publicly accessible under the URLhttps://alice.com/files/{uuid}
.
- Mal still doesn't know the file UUID, but that's easy to discover. She accesseshttps://alice.com/@mal@mal.com
and scrolls to her latest post, which will includehttps://alice.com/files/{uuid}
as the attachment URL. She downloads it and receives the file index.
- Now having a list of all files and exact URLs, she repeats the attack N times but with/api/list-files
replaced with/media/{id}
. Each activity she sends will then leak up to 16 media files, which allows her to quickly scrape Alice's entire file collection.
Note: this is described in terms of Sharkey instances, but works against any ActivityPub server where the private IP check is either missing or disabled by the admin. -
#Sharkey #Support@monkee@other.li @monkee@forum.other.li no worries! Please feel free to reach out if you have more questions. I (fortunately / unfortunately) have a lot of experience with Sharkey's security model and requirements
-
#Sharkey #Support@monkee@other.li @monkee@forum.other.li yes, but it exposes the entire machine. An attacker can set a DNS record that resolves to your private IP range, and then reference that domain as a media attachment. Then they federate the post to your instance and the media server downloads that URL (which resolves to the internal IP) and attaches it to the post. Finally, they go to the copy of the post your instance and download the attachment, which contains whatever private data was there.
The impact is less severe when it's only the one IP, but you should still take the time to make sure nothing sensitive is accessible over localhost. -
#Sharkey #Support@monkee@other.li @monkee@forum.other.li ohh yeah, that one again. FYI, changing that value can open you up to security issues if you have anything sensitive on the same network.
-
#Sharkey #Support@monkee@other.li @monkee@forum.other.li huh, what a strange bug! What ended up being the cause?
-
#Sharkey #Support@monkee@other.li @monkee@forum.other.li ah, gotcha. I'm glad you got it working!
-
#Sharkey #Support@monkee@other.li @monkee@forum.other.li is this still a problem? I'm able to load the other account from my Sharkey instance (running latest dev build).