manton
manton

Thinking again about disabling all support for .php requests in Micro.blog. It’s needless traffic, thousands and thousands of requests a day that go nowhere, looking for WordPress exploits. There’s legitimate use for redirecting old URLs, but it’s very rare that an old blog even exposes .php URLs.

|
Embed
Progress spinner
bens@mastodon.xyz
bens@mastodon.xyz

@manton agree

|
Embed
Progress spinner
matt_garber@mastodon.sdf.org
matt_garber@mastodon.sdf.org

@manton Maybe you could start by disabling URIs that *end* in .php, so old redirects using something more common for a time without clean URLs like ‘/index.php/hello-world’ would still be unaffected for the time being, and reevaluate again later if you have those patterns still in use. (Added benefit of being easy to regex, too.)

|
Embed
Progress spinner
manton
manton

@matt_garber That makes sense. URLs ending in .php would be enough.

|
Embed
Progress spinner
thomascbullock
thomascbullock

@manton would this cut off MarsEdit support?

|
Embed
Progress spinner
bjhess
bjhess

@manton It is wild how many requests come in to *.php. Not being able to easily block those sooner than Rails (middleware) is definitely a downside for us being on a hosting service like Render.

|
Embed
Progress spinner
manton
manton

@thomascbullock Nope. MarsEdit uses our XML-RPC interface, it’ll keep working.

|
Embed
Progress spinner
manton
manton

@bjhess It’s crazy and a little sad. I have essentially a list of disallowed URL paths in Micro.blog — like /wp-admin or whatever — where I cut those requests off before they bog down any other processing, but I’d like to do more to get rid of them early.

|
Embed
Progress spinner
bjhess
bjhess

@manton Yeah! We’ve got some Rack::Attack regex action going, ala:

req.path.match(/\.php[2-9]?$/i)

Earlier the better for sure!

|
Embed
Progress spinner
In reply to
dfj
dfj

@manton Agree it’s sad that it’s necessary but is totally worth doing as early as possible (along with any other obviously bogus traffic). I’ve worked on systems that did exactly this and it was surprising how effective basic matching rules can be at cutting down bot traffic.

|
Embed
Progress spinner
dfj
dfj

@manton Also, if you have something that’s really lightweight at connection handling, you could do something like just never respond to the requests. That might tie up more resources on their end and slow down that traffic somewhat. Their client would probably be waiting until timeouts hit rather than immediately moving on to the next exploit to check for.

|
Embed
Progress spinner
bloftin2
bloftin2

@manton For the previous 2 years I’ve had WordFence installed on my WordPress blog. My blog has like 20 readers, and maybe 10 views a day to put things into perspective. I was blown away by the attempts from all over the planet to look at the site. I blocked every country by the US and UK. There were contant attempts from everywhere.

|
Embed
Progress spinner
ki.tt
ki.tt

@manton Oh, that is a great idea!

/me goes to implement on own site

|
Embed
Progress spinner
ki.tt
ki.tt

@manton

Oh, that is a great idea!

/me goes to implement on own site

|
Embed
Progress spinner