Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

What does this suspicious URL structure do?

+5
−0

I (well, my spam trap) received email that I know is a scam, but I'm trying to understand how it works. The message contains a URL of the following form:

https:/example.com:2096/?goto_app=SomethingWithoutAnExtension

The single / after the protocol is suspicious, and I assume the key to a redirect that would be unfortunate. But how does this work? What's going on here?

I wondered if everything between the first two slashes would be ignored (I've heard of an exploit that works that way), but if so, I'm not sure how the rest of this string could do anything. There's not another layer of path that could be a URL,[1] and the thing after goto_app doesn't end in .exe or the like. I don't know if port 2096 is special.

I'm not going to try it to find out, but I did try going to https:/mydomain.example (a domain I control, not literally "mydomain"), using one slash instead of two, and Brave took me to my site. I tried looking it up in the IETF URL spec (is that the right place?) but I didn't find the details I was looking for (or maybe I'm looking in the wrong place).

How should this URL be parsed? How does this presumed scam work?


  1. If the URL were instead https:/example.com:2096/something.example?goto... then I would assume that everything up to the second slash is a decoy and it would take me to htttps://something.example?.... But there aren't enough slashes in the suspicious URL I received. ↩︎

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

2 answers

You are accessing this answer with a direct link, so it's being shown above all other answers regardless of its score. You can return to the normal view.

+6
−0

I think to some extent, you actually answered your own question, possibly without realizing it.

A URL is a specialization of a URI. (Or more technically accurate, a URI is a generalization of a URL.) URIs are required to specify a scheme (https, mailto, gopher, tel, ...) but they aren't necessarily required to separate the two using ://; many URI schemes use a simple :.

However, a URI will always separate the scheme and the remainder by either : or ://.

A https scheme URI (which is one type of "URL", if by URL we mean a string which specifies the location of a web resource) will always use :// to separate the scheme from the rest of the URL. (In a web context it's also valid to omit the scheme and the :, such as in //example.com/page.html, which is a protocol-relative URL instructing the client to access the named resource through the same scheme as that which was used to access the page on which the reference exists.)

However, people are imperfect and make mistakes. Since browsers try to be user-friendly, they will often provide various forms of autocompletion or correction of URL syntax where the intention of the user can reasonably be determined even though the exact syntax is incorrect. (An early form of this likely was not requiring the user to type http:// all the time. A later form was adding prefixes and suffixes such as www. and .com to non-fully-qualified host names, so that if you typed codidact into the address field the browser would take you to http://www.codidact.com/.)

Substituting :// for :/ immediately following a recognized scheme seems a low-impact such fix to make, and is almost certainly what you saw the effect of.

So whoever is behind the email likely took advantage of that something won't recognize such a string as a valid URL and therefore not subject it to in-depth scrutiny, whereas the email client will likely see the https scheme and pass it to whatever program is configured for handling https scheme URIs, likely a web browser, and the browser in turn will happily correct the syntax such that the effect is the same as if it had contained :// instead of :/.

In other words: in this particular case, there is likely no particular shenanigans involved; just someone taking advantage of different software handling slightly invalid input differently.

Which is not to say that there aren't Unicode domain name shenanigans out there, such as for example using (U+2215) instead of / (U+002F) to give the appearance of the domain name being different from what it technically is. But if your example is representative, that does not appear to be what's going on here.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

+5
−0

It's not as complex as a clever URL trick: your would-be scammer is incompetent. Technically, this is a malformed URL and shouldn't parse at all. The relevant spec is RFC 3986 §3 — for this purpose, there must be a literal :// between the scheme and authority (domain).

However, entering this into a browser will actually take you to the URL as if there was a double slash there. This is a browser feature, intended to correct for user error in typing URLs into the address bar.

Likewise, the port number isn't relevant to the scam here: it just happens to be the port that the scammer is hosting this website on.

The query string is probably relevant to the scam, but only in that it sounds like it directs you to the "right" place. My best guess here is that following the link would take you to a phishing scam intended to get you to provide your credentials for some popular service or other.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

Browsers definitely ignore URI syntax and take you to www.example.com when you type “example”. P... (1 comment)

Sign up to answer this question »