News for hackers. Stuff that matters.
Re:Curl those funny IPv4 addresses by IshKebab on Monday April 19, 2021 @05:38AM (#26860776)
Wouldn't it make more sense to just not support those weird formats? Nobody uses them and they can help attackers (mentioned in the post).
Re:Curl those funny IPv4 addresses by pferde on Monday April 19, 2021 @06:16AM (#26861020)
How do you know nobody uses them? I'd be willing to bet that there are many older in-house scripts puttering away in some dark, webbed corners of internal networks, which rely on this functionality, e.g. because they are getting their input from some obscure network appliances which print IP addresses like that.

I would fully expect support for these "weird" formats to be a (enabled by default) build-time option, but it's a good thing that curl maintainer is not just cutting it off right away.

Re:Curl those funny IPv4 addresses by maccard on Monday April 19, 2021 @09:44AM (#26862667)
Hoe many of those old in house scripts that aren't maintained or updated are keeping curl up to date?
Re:Curl those funny IPv4 addresses by rwmj on Monday April 19, 2021 @06:31AM (#26861104)
Some kind of build option or runtime CURLOPT would be ideal for this. I think we'd want to disable it by default in Fedora though.
Re:Curl those funny IPv4 addresses by kalleboo on Monday April 19, 2021 @10:06AM (#26862892)
I've seen software that uses the "single decimal number" representation in order to store IP address in a database integer type column
Re:Curl those funny IPv4 addresses by IshKebab on Monday April 19, 2021 @03:57PM (#26867251)
That's how they're stored in memory too, but that's just for storage. It is probably decoded to normal dotted form by the database layer.
Re:Curl those funny IPv4 addresses by throwaway823882 on Monday April 19, 2021 @08:23AM (#26861930)
People trying to circumvent censorship often look like "attackers".

When I was in middle school, I needed to research a paper in the school library computers. Their stupid computers were always messed up; first the proxy settings weren't configured in half the machines (I fixed that, and got scolded), then the anti-virus wasn't working (fixed that, got scolded). Then the proxies wouldn't let me search for my paper.

I was a budding hacker, so I figured out the numbering trick mentioned in this article, and was able to bypass the proxy and do my research for my paper. This was a long time ago but I bet the same situation is just as relevant today. (Doubtful that you'd use curl in this scenario, but nice to know they are preserving useful functionality rather than throwing it out)

Re:Curl those funny IPv4 addresses by cmeacham98 on Monday April 19, 2021 @10:54AM (#26863399)
Question: how did this trick help you bypass the proxy?

The only way I can think of this possibly helping you is by changing the Host header and that somehow fooling the proxy into allowing your connection through. However some random testing with both a modern browser and a really old version of firefox I have installed shows that it seems to convert the 'weird number format' into a proper IP address, even when using a proxy. In other words, I cannot see how using these weird IPs ever could make a difference from the proxy's perspective.