Ostrich McAwesome on Nostr: I thought this was done by DNS TXT record, but you're right, it accesses a file in ...
I thought this was done by DNS TXT record, but you're right, it accesses a file in the ".well-known" directory on a web server. That's awful!
Here's how I'd do it:
Create a wildcard DNS entry for the file server, with the server configured to accept any subdomain as valid. "*.example.com/.well-known/nostr.json" will always resolve, and the format of the subdomain will inform the server what JSON data to return (though it doesn't actually have to be valid, the point is just to leak an IP, which will happen regardless).
Then just DM people bait messages like "Hey, it's been a while" with a virgin account, and if they look at your profile, you'll have their IP.
If the subdomain string can be used to reference a npub, you'll have an IP/npub pair.
Published at
2024-01-22 04:31:54Event JSON
{
"id": "1ace43a2c222d4f24f1e80ea701e781dc5c05f60cb0677b8badc1b8fd6c38400",
"pubkey": "703533c2c16ac7771efb1bdf60a85df74e42f8409a007900f402ba4684f99184",
"created_at": 1705894314,
"kind": 1,
"tags": [
[
"e",
"f9f98c552bbc7181f42e49273d1f261b855f32156d3dd28f2fc4185949a7a2fd",
"",
"root"
],
[
"e",
"f9f98c552bbc7181f42e49273d1f261b855f32156d3dd28f2fc4185949a7a2fd",
"",
"root"
],
[
"e",
"8f9ff5f68d7daa118d0f4c80f7ef5dc797ca7e7dec86534a405c850a6dbe1d5c",
"",
"reply"
],
[
"p",
"703533c2c16ac7771efb1bdf60a85df74e42f8409a007900f402ba4684f99184"
],
[
"p",
"21b419102da8fc0ba90484aec934bf55b7abcf75eedb39124e8d75e491f41a5e"
],
[
"r",
"*.example.com/.well-known/nostr.json\""
]
],
"content": "I thought this was done by DNS TXT record, but you're right, it accesses a file in the \".well-known\" directory on a web server. That's awful!\n\nHere's how I'd do it:\n\nCreate a wildcard DNS entry for the file server, with the server configured to accept any subdomain as valid. \"*.example.com/.well-known/nostr.json\" will always resolve, and the format of the subdomain will inform the server what JSON data to return (though it doesn't actually have to be valid, the point is just to leak an IP, which will happen regardless).\n\nThen just DM people bait messages like \"Hey, it's been a while\" with a virgin account, and if they look at your profile, you'll have their IP.\n\nIf the subdomain string can be used to reference a npub, you'll have an IP/npub pair.",
"sig": "c4a4c76a72a78f265ea16cd924867acfcf0f3493a71dea32590459cea6456f3914f2d84b57193489ef4799fcc32fd3973b3607c72c60d283e80a3683b876f109"
}