News for hackers. Stuff that matters.
Re:Nike.com's robots.txt by hughrr on Friday February 11, 2022 @07:06AM (#30300428)
I made my robots.txt 2Gb of garbage from dev random to see how many spiders I could break. At least three Chinese ones downloaded the whole file.
Re:Nike.com's robots.txt by cookiengineer on Friday February 11, 2022 @07:41AM (#30300730)
> 2Gb of garbage

I serve my robots.txt files with Transfer-Encoding: gzip and Content-Encoding: gzip, chunked and then just serve a two layered 10G gzip bomb (240kB file size) instead.

Can recommend. Works pretty often.

Re:Nike.com's robots.txt by samhw on Friday February 11, 2022 @07:46AM (#30300768)
Doesn't it mostly penalise the honest bots, though? Or do some bots use robots.txt files as a proxy sitemap? I'm not that familiar with this area.
Re:Nike.com's robots.txt by cookiengineer on Friday February 11, 2022 @07:47AM (#30300776)
You can also insert a Disallow: /wp-admin/ in there and just serve the gzip bomb then :D
Re:Nike.com's robots.txt by berkes on Friday February 11, 2022 @07:54AM (#30300856)
I have anyone requesting this automatic going to fail2ban¹, but serving a bomb at that url is actually much smarter.

¹anything .php,.asp and some other tech we never use, also phpmyadmin, cgi-bin, and some more, actually.

Re:Nike.com's robots.txt by hughrr on Friday February 11, 2022 @08:05AM (#30300950)
Actually now you mention that I’m going to see if I can set a trap for our pen testers :)
Re:Nike.com's robots.txt by Shadonototra on Friday February 11, 2022 @11:57AM (#30303716)
i hope you don't ban the IPs permanently

nobody own their IP, and at some point a legitimate person will be assigned that IP

and most people who do bad things on the internet use some proxies, usually residential ones

it always makes me sad when people put such rules

Re:Nike.com's robots.txt by nixgeek on Friday February 11, 2022 @12:08PM (#30303890)
Most crawlers aren’t going to come from ASN which are populated with eyeballs.
Re:Nike.com's robots.txt by berkes on Monday February 14, 2022 @09:42AM (#30332546)
Fail2ban, by default, bans an IP for a limited time. For me that's 20mins.

This means that commonly only about 30 IPs are on the banlist. The chance that anyone using the same IP as a bot who is visiting any of the apps and sites on that server is not 0%, but tiny.

The only goal is to stop bots and worms from hammering my server. It hardly improves security; it shouldn't anyway.

Re:Nike.com's robots.txt by spookthesunset on Friday February 11, 2022 @10:59AM (#30302930)
Damn, that is a good idea. I wish I thought of that back when I ran a web forum.
Re:Nike.com's robots.txt by berkes on Monday February 14, 2022 @09:48AM (#30332608)
There are fail2ban configs for most popular software ready to use. E.g. WP fail2ban¹ is a config that bans an IP after failed login attempts. The defaults it ships with are well-balanced between security and not-locking-yourself-out.

Drupal, PHPBB, etc all have such generic config defaults online. For frameworks such as Rails, Django etc its a bit harder because the logging and url-schemes are not standard, but defined by the person developing in that framework.

¹https://wordpress.org/plugins/wp-fail2ban/

Re:Nike.com's robots.txt by alfiedotwtf on Friday February 11, 2022 @08:26AM (#30301183)
LOL that's actually really neat
Re:Nike.com's robots.txt by comonoid on Friday February 11, 2022 @11:55AM (#30303688)
Sane implementations do not read more than 500KiB of robots.txt contents.
Re:Nike.com's robots.txt by carapace on Friday February 11, 2022 @11:34AM (#30303430)
That's delicious!

BTW, how's your stealth browser project coming along? (I'd go look but I'm in a weird situation right now where I can't view most of the web. It's browser related so maybe this would amuse you: I'm running Firefox 91.5.1esr on FreeBSD from the official pkg. The vast majority of HTTPS sites give a "Your connection is not secure" error (Error code: NS_ERROR_NET_INADEQUATE_SECURITY) with no recourse (no button to let you make an exception or anything like that. It literally says, "The website administrator will need to fix the server first before you can visit the site.") The fix is to disable SPDY for HTTP2 connections. That works, but then FF crashes (with a core dump, hello FreeBSD) within ~10 seconds no matter what I do. There are a few clues, but I'm just not interested in shaving this yak. Frankly, I'm shopping for a new browser as I find the situation ridiculous. Your project seems way more interesting than what FF has become.)

Re:Nike.com's robots.txt by cookiengineer on Friday February 11, 2022 @12:04PM (#30303817)
Did you try to breakout using pwnat to get a public port? In enterprise grade environments it usually works :D

I think I'd also try to run a UDP tunnel or try to use an amplification redirect on a UDP relaying proxy to get an open port that you can send requests through. Sometimes public DNS resolvers can help to punch a hole through the NAT because their IPs are allowlisted to unbreak secure browsing modes.

> re: stealth

I forked webkit into retrokit [1] these days and am gradually removing all APIs that could be abused for tracking purposes ... with the idea to create a minimalistic webview that is embeddable in a browser and still is able to parse/lex/render modern HTML5 and CSS4.

This way I can later bundle nodejs with the retrokit webview that just displays the Browser UI that's served locally.

[1] https://github.com/tholian-network/retrokit

Re:Nike.com's robots.txt by carapace on Saturday February 12, 2022 @11:23AM (#30313923)
I don't think it's a network issue (we're at home) because all the other browsers work. This version of FF is just weird about HTTP2/SPDY. I don't want to shave this yak.

Retrokit looks great. :)

Re:Nike.com's robots.txt by Cthulhu_ on Friday February 11, 2022 @08:52AM (#30301462)
I should try something like that for the endless bots that seem to try and access our site. Instead of outright banning them, put them in a special user group that gets a gzip bomb whenever they try to access the site again.

Is there a way to make it so it doesn't outright make processes crash or lock up, but instead really slow them down / hang them up for a long time?

Re:Nike.com's robots.txt by cookiengineer on Friday February 11, 2022 @09:47AM (#30302054)
At some point I just got annoyed by all the 4chan script kiddies and went in active defense mode :D

Also lookup "slowloris attack" -It's pretty efficient if the attacker has more network bandwidth than you have, and can even out the advantage.

Won't be as effective against them having more networked machines though, so you have to use some other tricks against shodan, websnort, burp suite etc.

There are some other tricks though, and you can also abuse HTTP smuggled headers (in the response) to specifically crash their proxies, for example :)

Most common vulnerability scanners use some standard http libraries, so they are vulnerable to slowloris + chunked encodings, or they can't recover from a broken http trailing header, or from an http2/3 upgrade/downgrade loop that breaks their UDP packet parser.

What also works is if you spoof their SOCKS5 proxy with UDP bind requests until they can't use it anymore. So for a lot of DDoS attack scenarios there are active defense options to mitigate the damage which the redteam can cause.

Re:Nike.com's robots.txt by lancesells on Friday February 11, 2022 @08:51AM (#30301446)
Is this how a coordinated, large group of websites could "DDOS" Bing or Google?
Re:Nike.com's robots.txt by pikseladam on Friday February 11, 2022 @07:46AM (#30300767)
you are evil :)
Re:Nike.com's robots.txt by durnygbur on Friday February 11, 2022 @07:53AM (#30300840)
ur zo smart
Re:Nike.com's robots.txt by 5e92cb50239222b on Friday February 11, 2022 @07:14AM (#30300492)
Next time drop a symlink from robots.txt to /dev/urandom and see how it goes.
Re:Nike.com's robots.txt by dspillett on Friday February 11, 2022 @07:27AM (#30300604)
You might want to rate limit that if you don't magically have free unlimited bandwidth quota.
Re:Nike.com's robots.txt by marginalia_nu on Friday February 11, 2022 @07:32AM (#30300656)
I hear it's decades of bad luck to do unless you check that the crawler's user-agent isn't "search.marginalia.nu"; but you could just tarpit the connection.
Re:Nike.com's robots.txt by dijit on Friday February 11, 2022 @07:38AM (#30300707)
While I'm in general not a fan of wildcard certificates, yours doesn't work for the bare domain: https://i.imgur.com/uKVK5xd.png

I was hitting it plaintext first, so a simple redirect to some subdomain instead of a bare redirect to https would probably work fine.

Re:Nike.com's robots.txt by marginalia_nu on Friday February 11, 2022 @07:48AM (#30300794)
Hmm, curious behavior. I'm not getting that in any of the browsers I can run. Maybe some safari-specific interpretation?

I don't trust letsencrypt and I don't want to give them or anyone else a list of which subdomains I use.

Re:Nike.com's robots.txt by jffry on Friday February 11, 2022 @08:12AM (#30301015)
There may be some type of caching problem. When I visit https://marginalia.nu directly, I'm served with this cert, which does not include the apex domain: https://crt.sh/?id=6046506678

When I visit https://search.marginalia.nu I'm served with this different cert, which does include both wildcard and apex: https://crt.sh/?id=6125359537

Re:Nike.com's robots.txt by input_sh on Friday February 11, 2022 @08:09AM (#30300987)
It's simple, your cert points to *.domain.tld, domain.tld doesn't have a subdomain, <anything>.domain.tld does. You should expand it to include both domain.tld and *.domain.tld.
Re:Nike.com's robots.txt by jffry on Friday February 11, 2022 @08:13AM (#30301034)
It seems like a bad cert is being served at the redirect; the LE cert at https://search.marginalia.nu DOES have both the wildcard and apex domain

See https://news.ycombinator.com/item?id=30301015

Re:Nike.com's robots.txt by MonaroVXR on Friday February 11, 2022 @07:15PM (#30308657)
> .domain.tld

Oof, I'm not sure if I would do that. Since "" stands for all sub domains.

Re:Nike.com's robots.txt by timvdalen on Friday February 11, 2022 @07:55AM (#30300868)
I can at least reproduce it in Chrome, for what it's worth. Perhaps you have the redirect to www cached?
Re:Nike.com's robots.txt by marginalia_nu on Friday February 11, 2022 @07:57AM (#30300887)
On an Apple or another OS?
Re:Nike.com's robots.txt by seszett on Friday February 11, 2022 @08:11AM (#30301006)
I can reproduce it even just with curl on Linux.

The certificate is only for "*.marginalia.nu", which simply doesn't cover "marginalia.nu". It should give the same error on any platform and browser, unless their SSL implementation is broken.

Some browsers try to be smart and insert www automatically though.

Re:Nike.com's robots.txt by Ronsenshi on Friday February 11, 2022 @07:57AM (#30300886)
I would recommend getting certificate which includes root domain and wildcard subdomains to cover all bases.
Re:Nike.com's robots.txt by jffry on Friday February 11, 2022 @08:08AM (#30300977)
The cert I am seeing [1] does include both the wildcard subdomain AND the apex domain

[1] https://crt.sh/?id=6125359537

Re:Nike.com's robots.txt by seszett on Friday February 11, 2022 @08:15AM (#30301046)
That's not the certificate I get served though (this one is from 5 february, the one served is from 25 january) do you actually get this certificate on https://marginalia.nu?
Re:Nike.com's robots.txt by jffry on Friday February 11, 2022 @08:19AM (#30301096)
I misunderstood what URL we were talking about. What I am seeing:

https://marginalia.nu = https://crt.sh/?id=6046506678 (includes wildcard but NOT apex)

https://search.marginalia.nu = https://crt.sh/?id=6125359537 (includes both wildcard and apex)

Re:Nike.com's robots.txt by marginalia_nu on Friday February 11, 2022 @08:26AM (#30301178)
Ah, I see what's happening. search.marginalia.nu goes through cloudflare which does its creepy MITM thing and re-encrypts on its end; the others do not.
Re:Nike.com's robots.txt by wizzwizz4 on Friday February 11, 2022 @08:41AM (#30301339)
Why does marginalia.nu use Cloudflare? Have you been hit by DDOSs? I can't think how a search engine would benefit from Cloudflare caching things.
Re:Nike.com's robots.txt by marginalia_nu on Friday February 11, 2022 @08:43AM (#30301363)
Yeah, It's 100% about bot mitigation. I got hit pretty bad by some botnet a while back, saw 10-15 searches/second. Can't have nice things on the Internet I guess.

Don't really understand their motive either. Maybe they thought I was cloud hosted or used some expensive API to do searches and were attempting to rack up big bills or something.

Re:Nike.com's robots.txt by wizzwizz4 on Friday February 11, 2022 @08:47AM (#30301415)
:-|

I wish I had a good solution to this. Cloudflare to mitigate DDOS attacks has somewhat of a “baby with the bathwater” vibe (considering how much of a pain it is if you can't pass the CAPTCHA, or if you're on Tor), but I can't think of an alternative.

Re:Nike.com's robots.txt by marginalia_nu on Friday February 11, 2022 @08:50AM (#30301439)
:-| indeed.

I've considered having a naked endpoint with a rate limiter that, when it hits some ceiling (dunno, sustained load of 2 RPS or so), offers the alternatives of going through an unlimited cloudflared domain, or waiting until the bots give up. But that might be annoying too.

Re:Nike.com's robots.txt by wizzwizz4 on Friday February 11, 2022 @09:08AM (#30301631)
You could try to push forward the frontier of accessible CAPTCHAs. You just need some tasks that basically all humans can do, but barely and bots can, that don't rely on vision, hearing, emotional response or cultural knowledge. Should be easy, right?
Re:Nike.com's robots.txt by rosndo on Friday February 11, 2022 @07:28AM (#30300618)
Free unmetered bandwidth is pretty much the norm unless you have fallen for some “cloud” scam.

edit: s/unlimited/unmetered/

Re:Nike.com's robots.txt by dspillett on Friday February 11, 2022 @07:47AM (#30300785)
Free unlimited bandwidth always has a catch somewhere, that this use could trip on, unless the service is fairly expensive.

There is often a “fair use policy”, and even without anything like that you need to consider the potential effect on the stuff you are actually running the service for (while a search engine is pulling random data as fast as they can, that transfer is competing against other network load). I have a couple of inexpensive hosted servers with genuinely unlimited bandwidth, but only at 100 and 250mbps respectively, better rates cost a fair chunk more without some sort of cap (usually of the form “after some-TB-or-some-tens-of-TB we'll throttle you to 100mpbs until your next billing month”.

Unlimited throughput on gbit/more lines is commonly available, but never both cheap and reliable.

Re:Nike.com's robots.txt by rosndo on Friday February 11, 2022 @08:32AM (#30301242)
> Unlimited throughput on gbit/more lines is commonly available, but never both cheap and reliable

It’s been a long time since you could call OVH “unreliable”, Hetzner chugs along just fine too.

I think you might just be stuck in 2004, reliable unmetered gbit+ has been cheap for years.

Re:Nike.com's robots.txt by dspillett on Friday February 11, 2022 @11:06AM (#30303025)
> reliable unmetered gbit+ has been cheap for years

I suppose that depends on what you call cheap, and whether you include “guaranteed”/“dedicated” in the definition of reliable for bandwidth.

I'm looking at things mainly from a personal projects & packups PoV, but demanding at least two drives for RAID1+ rather than the cheapest units. If you have money-making projects then the lines between cheap/inexpensive/reasonable might move.

> OVH / Hetzner

I have Hetzner down as “inexpensive” rather than cheap, assuming you count the older hardware in their auction lines (with their new-kit offerings being “reasonable”).

OHV is cheap if you are considering their lower-spec offerings, but those are at limited rates (100mbit usually in the case of Kimsufi branded services, 250mbit for SYS) and IIRC that rate is not guaranteed (while not a massively oversold resource like you'll see in many VPS/shared/similar hosting arrangements, there are enough machines sharing a larger resource that if many try saturate their allocation at the same time they'll hit congestion even within the DC rather than just when your traffic touches external peering).

(Don't take the above as a criticism of Kimsufi/SYS - they are honest & open about the limits of the services they sell (older hardware, limited max network throughput) - I get what I pay for, which is no less than promised, and I've found them to be reliable over the years I've had services with them)

Re:Nike.com's robots.txt by rosndo on Friday February 11, 2022 @12:14PM (#30303975)
> I suppose that depends on what you call cheap, and whether you include “guaranteed”/“dedicated” in the definition of reliable for bandwidth.

Then there are no cheap options. Even frivolously expensive “cloud” providers don’t give you this.

The reality is that there are very few customers that actually have a real need for “guaranteed”/“dedicated” bandwidth.

Re:Nike.com's robots.txt by CodesInChaos on Friday February 11, 2022 @10:25AM (#30302475)
I think the concern here is about congested peerings to certain providers, not uptime.

For example Deutsche Telekom: They don't accept free direct peerings. Sending data to them indirectly frequently runs into congestion issues. For a while Hetzner offered a paid option for better connectivity to DTAG. It looks like Hetzner added a direct peering in 2020.

https://web.archive.org/web/20200205014018/https://wiki.hetz...

https://www.hetzner.com/news/03-20-dtag/

Re:Nike.com's robots.txt by franga2000 on Friday February 11, 2022 @07:34AM (#30300671)
Both old-school webhosting and modern cloud hosting commonly have data caps. Unlimited data is common only on mid-to-high-end VPS or dedicated servers and unlimited bandwidth doesn't really exist.
Re:Nike.com's robots.txt by rndgermandude on Friday February 11, 2022 @08:00AM (#30300911)
>unlimited bandwidth doesn't really exist.

True, when there is no deliberate cap stated, it's unmetered, not unlimited, meaning you can use what however much fits through the pipes (usually best effort instead of guaranteed bandwidth), and that's the natural limit. A 1 Gbit/s link for example will get you close to 300 TiB in each direction in a 30 day month if you are able to saturate that link 24/7, while a 100MBit/s link will get you a tenth so "only" close to 30TiB.

Re:Nike.com's robots.txt by hughrr on Friday February 11, 2022 @08:11AM (#30301007)
Someone will always pull the plug when you hit the undocumented limit.
Re:Nike.com's robots.txt by rosndo on Friday February 11, 2022 @08:29AM (#30301210)
Big providers like OVH and Hetzner (and many others) offer truly unmetered bandwidth. You can max out your line nonstop for as long as you’d like.
Re:Nike.com's robots.txt by dspillett on Friday February 11, 2022 @10:53AM (#30302829)
Yep, the cheap dedicated servers I have are with Kimsufi and SoYouStart (both OVH brands), though the lines are limited to 100mbit and 250mbit respectively and IIRC neither is guaranteed (something like X servers sharing a gbit+ connection, where Xrate > TotalLineRate) so I can usually* but not always get 100mbit out of kimsufi. I've not really pushed the SYS machine's resources yet, it is a recent addition to my dominion.

A search engine pulling data from /dev/urandom as in the post that started this discussion is likely to impact other uses of the 100mbit link from Kimsufi. Worse if bad luck means multiple hits of that sort at the same time.

Re:Nike.com's robots.txt by rosndo on Sunday February 13, 2022 @06:46AM (#30321083)
If you’re too small to get negotiated rates, you can still get kimsufi and SYS kit with guaranteed gbit from resellers.

Check out https://discord.com/invite/7Gv8tdM

There are really good deals available, all of these still come with a decent margin for the reseller.

  Core i3-2310 8GB RAM 2x2TB HDD 1Gbps Unmetered €16
  Core i5-2300 16GB RAM 2x2TB HDD 1Gbps Unmetered €24
  E3-1225 16GB RAM 2x2TB HDD 1Gbps Unmetered €35 (iGPU enabled)
  W3520 16GB RAM 2x2TB HDD 1Gbps Unmetered €40
Re:Nike.com's robots.txt by 300bps on Friday February 11, 2022 @08:10AM (#30300993)
Please tell me what provider has free unlimited bandwidth.

I’ve heard this false notion so many times on HN and every time I check it out, the provider says clearly that they don’t allow for unlimited bandwidth.

So please tell me the provider. I’ll pay for a month of service for 10 Gbps unlimited service and then I’ll saturate that line up and down stream for an entire month.

And we’ll just see what happens, ok?

Re:Nike.com's robots.txt by seszett on Friday February 11, 2022 @08:22AM (#30301136)
> Please tell me what provider has free unlimited bandwidth.

Unmetered rather than unlimited of course, but OVH, Online.net, Hetzner. These are rather well-known providers.

I haven't checked all of them for the exact language but Hetzner explicitly says "All dedicated root servers have unlimited traffic" for example.

Of course, they do have a limit for servers with 10 Gbps connections probably because of people like you who like to push the limits beyond what is reasonable.

Re:Nike.com's robots.txt by rosndo on Friday February 11, 2022 @08:26AM (#30301184)
Yep, those. Also FDCservers, Nforce, psychz, worldstream and countless of others.

I have extensive experience maxing out unmetered 10gbit lines with these providers 24/7. It’s been years and years since a host last tried to FUP me, bandwidth is just really cheap now.

Re:Nike.com's robots.txt by samhw on Friday February 11, 2022 @07:48AM (#30300791)
This isn't physically possible. I think you're confusing (a) an ISP saying "we'll give you all the bandwidth we get (from our tier 1 networks / backbone links)" with (b) genuinely unlimited bandwidth, which would suppose a infinitely large carbon fibre cable subsuming the universe, or something along those lines.

(a) may not be that much, in reality, depending on how their network is set up, and how much other traffic there is at any given moment. It also depends where you're routing to, whether e.g. (i) your neighbour or (ii) a DC across the world (neither is clearly better, it all depends). You have to think of it through the lens of physics and information theory, rather than law and business models.

Re:Nike.com's robots.txt by vidarh on Friday February 11, 2022 @08:03AM (#30300933)
This is pointlessly pedantic. In this context the term is being used to refer to unmetered and uncapped bandwidth and that usage is well understood.
Re:Nike.com's robots.txt by samhw on Friday February 11, 2022 @08:58AM (#30301537)
I'd agree if the upper bound of unmetered and uncapped bandwidth were so far in excess of the possible upper bound for this application that it were silly to consider - but, like I addressed in my comment, it's very much not.

If he were only talking about meters or caps, then that would therefore make his point a bit of a non sequitur in the context of an argument about whether tarpitting/blackholing a connection is risky for the serving party.

(FWIW, at past companies I've not-infrequently encountered network saturation even without an artificial cap from whomever we were peering with.)

Re:Nike.com's robots.txt by toast0 on Friday February 11, 2022 @12:15PM (#30303983)
Genuine unmetered/unlimited bandwidth claims also include a port speed. And the really good claims will include a 'minimum sustained' rate (with well connected peers), which lets you complain when you can't get decent throughput because all the servers on the 10G switch share a t1 out to the local internet exchange.
Re:Nike.com's robots.txt by hughrr on Friday February 11, 2022 @08:04AM (#30300942)
It’s almost worth burning my terabyte quota on Linode to try this out :)
Re:Nike.com's robots.txt by DigitallyFidget on Friday February 11, 2022 @07:36AM (#30300678)
This is brilliant. I'm doing this for my personal site. I have a gig uplink and no data caps.
Re:Nike.com's robots.txt by kenniskrag on Friday February 11, 2022 @07:43AM (#30300746)
can I do that with non existing domains or mal. login attemps in a nginx config? That would maybe slow down the attackers a little :)
Re:Nike.com's robots.txt by altdataseller on Friday February 11, 2022 @07:51AM (#30300821)
I did something like that once and the next day my hosting provider warned me I was under a DDOS attack. Might have been a coincidence though.
Re:Nike.com's robots.txt by rei_ayanami on Friday February 11, 2022 @09:51AM (#30302092)
develish