Purging WordPress .ico Malware… (Hopefully)

So, this is a hopefully, because it’s been a bit since I have done this, and things seem to be clean. So, there is a reasonably common bit of Malware out there that seems to affect WordPress sites, I say reasonably common, because in my time looking for a solution, I have come across a fair number of others with the issue, but no solutions. And I have tries several solutions. As of now, I have been a few months clean, and without hacky work-arounds. I’m going to attempt to run through what I did that held it at bay, and what seems to have finally managed to purge it, in hopes of helping others.

The Malware itself basically would occasionally redirect the blog domain to a spam website. I say occasionally, because it’s not all the time, and with enough anti-advertising stuff in your browser, you may never see it happen. I have personally, never once seen it happen, on any of the sites I run on this web space. I first found it was infected because occasionally, my wife would mention that someone she had linked her blog to, was getting sent to a spam website. Initially I thought maybe someone was mistyping the domain along the line. My wife also said it would happen occasionally. In my work combating this malware, it seems like the actual redirect occurs slowly over time, as the infections spreads.

It also will spread across sites hosted on the same server. Which made it extra tricky to fight because I had to juggle several sites at once.

Part 1 – Keeping It at Bay and How it Spreads

I have no idea how the infection was initially started, which is rough, because that would be key to KNOWING it’s gone. As near as I can tell, the initial source of the infection is int he uploads directory of a blog. It eventually starts to add “gibberish code” to files like wp-config.php and settings.php. I say “Gibberish Code” because it’s actual PHP, but it’s very messy in it’s design and encoding to make it hard to read to locate files. The gibberish code would generally show up at the top of the files, but could be elsewhere.

Eventually, random folders would start showing up in the root WordPress directory, sometimes with gibberish names, sometimes with specific spammy sounding names, sometimes with names that appear to be part of the blog (like ‘site’ or ‘blog’).

The first step in holding this at bay was so dump all write permissions for several critical WordPress files that kept being infected. This seemed to only sort of help, the problem was more that the owner, www-data, still could write to the files.

The next step was to convert all of the web files to an alternative user account as the owner, then set the files so www-data could only read. This created a new problem, it meant I could not easily update anything or upload images for blog posts easily. Since www-data had no permissions to write anywhere. If I was making a new post, I would have to SSH into the server, temporarily change the permissions, then change things back.

Pain in the ass.

My temporary fix there, was to keep the current year as writable, and run a script that would probe for malware files and delete them. There were two scripts, one for the hidden .ico files that would crop up and one for any .php files that were in the Uploads folders. Both run with a cron job.

#!bin/sh
/usr/bin/find /var/www/html -name ".*.ico" -exec rm {} +

This is, admittedly, an EXTREMELY Hack way to correct this problem. Hack less in the sense of “computer hacker”, hack in the sense of “jankey or shoddy”. But it worked, while I figured out the root issues.

Part 2 – Fixing the Issue

Eventually I sat down and just sort of rebooted everything, all at once. I started with everything set up as an alternative user permissions and locked down. I then scrubbed out all infected php and ico files from the upload folders. I then thoroughly scrubbed out the wp-config files. Basically, any files I would need to moved to a fresh WordPress install, which was the uploaded images, and the configurations, were completely sanitized.

Next, I downloaded a fresh copy of WordPress, expanded it out and made copies for each site folder with websitename_new. After that, I copied the uploads folders and wp-config files to the new copies. Then i renamed each current folder as websitename_old, and renamed the new ones as simply websitename. (I actually did this and the subsequent steps once at a time for each site). This made the new, fresh installed copies live.

Except they have no plug ins and no themes. I did not transfer any old theme files or plug in files, for worry of infection. Instead I went into the old folders to get a list, then redownloaded each theme and plug in to the fresh copies. This meant doing some reconfiguring but it was worth it for clean copies. I also left out anything that wasn’t absolutely essential to the basic look and operation.

Site note, when a fresh install copy is made live, it may not load until you go into /wp-admin, and change the theme to literally anything else (Generally, the current year WordPress Default works). The config files will still be looking for the non-existent old theme.

With everything fresh and ready to go, I deleted the old potentially infected copies, to ensure the infection was now completely purged. After that, I created a backup folder, and copied all of the current fresh versions of the site folders to the back ups. This way, in the event of a reinfection, I could simply, slap a fresh back up in place easily. It might be missing a few recent images, but it would be way less work.

Still worried, I then reverted the permissions for the sites back to www-data, but I did them one at a time, roughly a week apart. Carefuly checking for reinfection with each change.

So far so good, I have not had any problems. Here is hoping it stays.

My Music Listening Habits for 2021

It’s time again for my new favorite annual tradition here (until it isn’t), my music listening habits for the year. Not a lot of new this year, I’ll admit that. Though I sometimes wonder if part of that is that some artists and albums get sort of lost int he sauce of over listening to some of my favorite artists. Anyway onto the break down, I’ll split up artists and albums even though they kind of parallel each other.

Artists

The biggest movers this year were Aurora and CHVRCHES in the number two and number one spot. CHVRCHES has a new album released this year and Aurora in general is just really great. We also have Dodie at number 4, which I predicted last year would be a riser in the charts. Also at number 6 is Orla Garland, who in addition to being Dodie’s Guitarist, also released a pretty good album this year (Woman on the Internet).

Another one, though probably more well known than most of the rest of my top ten, is Dua Lipa. For some reason I keep having to remind myself just how good her album Future Nostalgia is, because every track on that one is excellent and I enjoy listening to it every single time.

Also a few regulars that have been floating around these lists, BT, Daft Punk, Lady Gaga, Avril Lavigne, Alanis Morrisette, The Who. I’ve also been listening to Nirvana a lot lately for some reason. Slightly surprising is that Rafaella is still up there at number 19. She opened for Sigrid when I went in 2019.

Albums

My most listened to Albums for the year are pretty in sync with the artists list. The top ten are dominated by CHVRCHES and Aurora, with the rest of the list covering others in the higher end of the list of artists. I honestly didn’t listen to enough different albums to make a proper list of new albums, but Screen Violence, Woman on the Internet, Build a problem, Red, Taylor’s Version, are all albums I would recommend.

Changes in Habits

So, I wanted to throw in real quick some changes in my music habits. One, I wanted to go to more shows after seeing Sigrid live, and this was re-enforced after seeing CHVRCHES. I keep mentioning this and so I should probably STOP mentioning this. I do already have two shows lined up for 2022, Dodie and Aurora, which isn’t a lot, but it’s something. Here is hoping the world doesn’t collapse on itself again now that we’re sort of able to do this sort of thing again.

I’ve also been shifting to FLAC over MP3. I re-ripped a few of my more favored CDs to Lossless format. I’ve also started buying FLAC instead of MP3s when I can. Part of this also means I’ve been getting less from Amazon, where I previously bought a lot of my music. It’s also part of why the “new” factor took a nose dive this year. I don’t use any music streaming services, I prefer to actually buy and own my music. Amazon did include some streaming I occasionally used with Prime, but the app has become disgustingly aggressive about pushing their paid streaming service so I removed it. Basically I’m sick of it and I’m “voting with my wallet”.

Precictions

I also want to make some predictions a bit for 2022. CHVRCHES will still linger but will likely start to fall off. The new album hype is over, going to see them live hype is over, I still have them in rotation but I can tell I’ve been listening less lately.

I predict Sigrid will start to make a come back. She is still my number one artist scrobbled of all time, but she has had almost zero movement this year. She put out a couple of tracks but I prefer to wait for albums these days, though Burning Bridges and Mirror are both good. I predict the come back because of the new album. HOWEVER, I predict she will lose the top all time spot to Aurora. Aurora also has a new album coming out next year, right at the start, and (unless the world fall apart again), I’m going to see Aurora live in May. Aurora is also very close to over taking Sigrid already.

I also predict BT will start to rise fairly quickly. I’ve bee doing some catch up on some of his newer albums and I still really enjoy his music. I also feel like Dua Lipa is going to start rising in the list and Tessa Violet is going to fall. Tessa Violet hasn’t really put putting out anything that interesting lately, mostly remixed versions of tracks already released. It’s not bad, it’s just not keeping my interest.

Finally, two to keep an eye on will be Sofi Tukker and King Princess. Both have been sort of bubbling along in the background for a while and I feel like both are going to start getting more play in my rotations and album listening.

CHVRCHES @ The Pageant feat Donna Missal (12/06/2021)

Back in 2019 after going to see Sigrid live, I decided I really wanted to go to more concerts. I even started planning to maybe try to go to Lollapalooza at some point. Then well, the world fell apart, and there were no concerts really for a while. Things are still kind of falling apart but they are better for people making an effort to make them better (though that’s a subject for another post). I did manage to make it to another concert. I even have one, maybe more lined up for 2022 already. This time it was CHVRCHES. It’s just pronounced “Sheevurches” so don’t over think it. No wait, it’s just “Churches”.

Funny enough, Last.fm suggests I started really listening to CHVRCHES a bit after going to see Sigrid, though I also started really trying harder with tracking music on Last.fm around that time as well. I am pretty really sure I have listened to at least some of their music before 2019. I’ve been listening to them pretty heavily for the past few years, spoilers for my end of year music wrap up, but they were my number one most listened to artist this year. Though they are still number 4 over all.

CHVRCHES at The Pageant

This show was once again in St. Louis, this time at The Pageant, a nice music hall a little north of Forrest Park off of Delmar Blvd. The supporting act was Donna Missal, whom I had not heard before. Before the show I had a pretty tasty chicken sandwich down the block at Chicken Out. I forsake my “Ramen Junkie” moniker this round a bit because the chicken seemed faster and I just wasn’t in the mood for noodles, despite that there is a Ramen Noodle restaurant just next door to the Pageant. Maybe next time.

I got tot he venue around an hour and a half early, I really wanted to get down up front like I had with Sigrid, though the light show of CHVRCHES is probably pretty good even from a distance. I managed to end up on the bar next to the stage again, down on the right side.

The show itself was really great. I enjoyed Donna Missal quite a bit and was kind of disappointed that I could not find her merch stand, despite her mentioning it, I had kind of wanted to pick up a CD if they had any. I did go ahead and get a digital copy of her newer album later. She had some pretty amusing moments with her guitarist, who, in her words, is her “crush” though “sadly, she is married… to a man…” Her setlist was 10 songs line, 9 original and one cover.

  • How Does It Feel
  • Jupiter
  • Skin
  • Butterfly
  • Insecure
  • Sex is Good
  • (To Me) Your Face is Love
  • Fake Plastic Trees (Radiohead Cover)
  • Best Friend
  • Let You Let Me

After a brief break was the main event with CHVRCHES. What a great show. Tons of amazing lighting effects, a solid performance, despite Lauren apparently having a cold. Not quite as much back and forth banter between the three as I would have liked and have seen in some of the other concert videos, but still a bit of fun bits in between tracks. I almost wonder if some of those break moments where they would chat were sacrificed for Lauren’s many costume changes. She came out in one outfit, and shed the jacket she was wearing after the first track, changed later into a second outfit, then later into a third, which was modified for the encore songs. So essentially 5 different “outfits”, though she doesn’t leave the stage to shed her jacket.

The show was also really good from an acoustics perspective. The audio engineers definitely deserve some credit for good mixing and balancing on things. It wasn’t overpoweringly loud like the Sigrid show had been. Though I did have a set of concert ear plugs this time, something I’d recommend honestly. Proper concert ear plugs are designed to slightly dampen the sound without making if muffled or too quiet. I really did not notice anything missing.

Anyway, CHVRCHES setlist was 17 tracks long, with the majority of the tracks being off of Screen Violence, which isn’t surprising. I also managed to get much better photos and video than when I saw Sigrid.

  • He Said She Said
  • Forever
  • Leave a Trace
  • California
  • How Not to Drown
  • Violent Delights
  • Science/Visions
  • Good Girls
  • Bury It
  • Miracle
  • Night Sky
  • Final Girl
  • Recover
  • Never Say Die
  • Asking For a Friend (Encore)
  • The Mother We Share (Encore)
  • Clearest Blue (Encore)

I particularly enjoyed Violent Delights, which is relentlessly aggressive live, the chaotic build of Science/Visions, Night Sky which is always great, and the massive build up of Never Say Die. Then of course Clearest Blue was a perfect closer track. However all of the tracks were excellent.

The encore itself was particularly special. In keeping with the “Horror” surface level theme of Screen Violence, Lauren comes back on stage covered in fake blood for the final three songs, still wearing her “Final Girl” T-shirt from the last costume change.

CHVRCHES – Screen Violence

CHVRCHES – Screen Violence Cover

Released – 2021.08.27

Note: I started on a general CHVRCHES write up I intended to post first but because I am a slacker, I didn’t finish it yet.

Screen Violence is the fourth full studio album from CHVRCHES, and the first that I’ve gone through a “release cycle” for.  It was preceded by three singles, He Said She Said, How Not to Drown, and Good Girls.  The videos all share a sort of kaleidoscope motif similar to the video for Gun.  I suspect this was done somewhat out of necessity due to COVID and travel restrictions, it helps minimize actual contact between people and reduces cross contamination risks.  Each had a sort of themed color, and all three featured the same rotating doorway.  How Not to Drown is a featured collaboration with Robert Smith of The Cure.

The release cycle has been quite fun, especially while hanging around the CHVRCHES fan discord.  There have been a couple of great live streams from iHeart Radio and Amazon music.  The Amazon show in particular made me even more excited to see them live later this year (assuming COVID doesn’t kill the tour).    A few more songs from the new album would be nice for the regular tour, but honestly I do like the idea of a nice mix of old tracks in there as well, which was what we’ve seen so far.

I didn’t jump on the merch train aside from having a CD on the way.  I’m not super keen on the design of the merch for Screen Violence, I’d be more inclined to buy something Love is Dead or Bones themed.

The whole album is pretty solid, though at this point I’m not sure that it’s their best album, more time is really needed to decide on that, there’s a few tracks that are just more “ok” than great, and overall there’s some good tracks but not too many really amazing tracks that just really stand out on initial impressions.  It’s definitely a darker tone and kind of a less chaotic feel than previous albums, which is nice.  It’s good, I’d recommend it, but I am undecided on if it’s their best album.

The Tracks

Asking For a Friend – I’m really enjoying the sound on this track, a pretty good upbeat feel to it.  I rather like the chaotic sound of the background rhythms.

He Said She Said – Originally my favorite of the three pre-release singles, but Good Girls over took it.  I still like it and I find “Angry Lauren” kind of amusing.

California – This track really fits the same movies theme of Final Girl later on the album.  It’s a pretty good upbeat track that slowly and quietly builds itself up over the course of the run.  It feels like it’s likely going to be very popular.

Violent Delights – At least Martin gets a little bit in this track, since he doesn’t get his own track in Screen Violence.  I’m not sure that I find this track super amazing on initial impression, but it also feels like it could be a track that could easily grow into being a favorite over time.  It has a nice progressive and airy feel that reminds me of other popular tracks like Night Sky or We Sink.

How Not to Drown – Definitely my least favorite of the three pre-album singles.  I think that enjoyment of this track depends entirely on how much people like Robert Smith and the Cure.  Personally, it kind of drags on and halfway through I’m already wishing it were over.

Final Girl – An interesting sound, it feels a lot more like a “traditional band” with the guitar and drums.  It’s got a pretty nice lower tone kind of retro feel to it for sure.  Interesting theme of the lyrics being literally about the “final girl” survivor of horror movies.

Good Girls – The more I listen to this track, the more I really like it.  It’s definitely my favorite of the three singles and possibly my favorite on the album. 

Lullabies – This song reminds me quite a bit of Deliverance with it’s nice and steady and even tones.  It’s not a particularly stand out track but there’s nothing particularly awful about it.

Nightmares – I enjoy the larger sound of this track and the general down tempo fullness, but there’s something that feels off I can’t quite figure out that I’m not really feeling.  Some good synth work going on here though.

Better if You Don’t – A nice light closer, which has become a sort of standard it seems, though it’s not nearly as light as say, Afterglow.  Just a nice guitar backed, light rhythm, track.  I like it.

And just to sort of wrap up here, I figure I’ll throw in my personal ranking of all ten tracks on the album.

  1. Good Girls
  2. Violent Delights
  3. California
  4. He Said She Said
  5. Final Girl
  6. Asking For a Friend
  7. Better If You Don’t
  8. Lullabies
  9. Nightmares
  10. How Not to Drown

Bulk Editing Last.fm for Better Stats

Last.fm Logo

Ok, this isn’t as exciting as you might think. One “social network” I have used for a very long time, possibly longer than any other, and I have used Twitter since 2006 and Facebook since 2007, is Last.fm. I’ve been scrobbling, off and on, since 2005. Only Flickr may rival Last.fm for my length of use and I don’t use Flickr anymore.

One issue that any user of Last.fm regular will be familiar with is the inconsistency of ID tags on music. My current annoyance, which spawned actual action, has to do with CHVRCHES. I’ve listened to CHVRCHES quite a bit on MP3s, I recently bought their discography in HQ FLAC files. the FLACs have the artist as CHVRCHΞS. The stylized E is cool, but it means that they show up in my scrobbles as two different artists. Not great for tracking stats.

Fortunately, I found a neat and useful script that will bulk edit this, so I can quickly and easily change all of the “CHVRCHΞS” into “CHVRCHES”. I also edited my FLAC files so they show “CHVRCHES” as well.

This script requires subscribing to Last.fm pro, which I’ve considered doing anyway, for better stats, and to support a service I have used for a while. Especially since it’s ridiculously cheap to do for a month or two. Plus is means I can go through and clean up some of the other discrepancies in my scrobbles.

I almost wish that subscribing would let me bulk import Scrobbles, because I have a couple of other accounts. The thing is, both of those accounts were just unattended semi-random plays from when I was messing with running a private streaming radio. They sort of represent my library at the time, but they don’t represent my streaming habits. The only real benefit would be that it would bump my total scrobbles by around 30,000 tracks. Which is cool, but it also would destroy my top artist, album and track lists.

These top lists are already a little iffy because there were periods when I was unable to scrobble for various reasons, and there are times when I listen to CDs in my car instead of through my phone, or some other device capable of scrobbling. And while pushing Pink Floyd to the top of the list as my most played artist would be semi accurate for my life of music, it’s not that accurate for the last 15 years. Plus Shiro Sagisu, Death Cab for Cutie and Nobuo Uematsu definitely aren’t top ten on my listening, I couldn’t name any Death Cab for cutie tracks despite 500 “scrobbles” on one of those secondary accounts. (Side note, Nobuo Uematsu, might be up there, plus I saw him live once).

So there are some limits to what could and should be added. As much as I would love to somehow travel in time and collect up all the music I have listened to since the 80s into a perfect representation of my music history, that’s just not possible and the current representation is plenty sufficient for now and going forward.