Fixing WordPress Mixed Connect Warnings After Installing An SSL Certificate

If you install your SSL certificate and get a Your connection to this site is not fully secure message, your first step is to inspect the page. In Chrome you can use F12 and click the Console tab. If on inspection you get the message Mixed Content: The page at ‘http://www.thisisafakeurl.ie/‘ was loaded over HTTPS, but requested an insecure image ‘http://www.thisisafakeurl.ie/picture‘. This content should also be served over HTTPS. that is a Mixed Content error. Use this blog post to fix a Mixed Content error.

Testing your URLs

To test if you can load your URLs over HTTPS instead of HTTP, complete the following steps:

  1. Make a note of your problematic URLs.

  2. To test if the URLs work over HTTPS change HTTP to HTTPS in the URL and verify that they load properly.

Perform a search replace using Better Search Replace plugin

To test if you can load your URLs over HTTPS instead of HTTP, complete the following steps:

  1. In your WordPress dashboard click Plugins and click Add New.

  2. In the Search plugins… field type Better Search Replace.

  3. Click Install Now.

  4. Click Activate.

  5. Click Tools > Better Search Replace.

  6. In the Search for field, enter your problematic URL, for example, http://www.thisisafakeurl.ie/picture.

  7. In the Replace with field, enter your problematic URL but change HTTP to HTTPS, for example, https://www.thisisafakeurl.ie/picture.

  8. In the Select tables field select all the tables.

  9. Uncheck Run as dry run?.

  10. Click Run Search/Replace.

  11. Repeat until you replace all your problematic URLS.

  12. Refresh your page and check for error messages.

Converting NMAP reports from HTML to XML

You can use NMAP to perform scans on targets. NMAP supports different output formats for saving scan results. You can choose normal, XML, and grepable. This post explains how use Kali Linux to save a report output as an XML file and convert it to readable HTML.

To use the XML output format complete the following steps.

  1. Open the NMAP terminal.
  2. Enter the follow command for your target: nmap [your target] -oX ~/Desktop/nmap.xml
  3. The report is saved on your desktop. You can read it using a text editor.

 

To convert the XML report into HTML complete the following steps:

  1. Open the NMAP terminal.
  2. Enter the following command: xsltproc Desktop/nmap.xml –o nmap.html
  3. The report is saved on your desktop. You can access it using the browser.

Migrating a WordPress site from Blacknight to Azure: Part 1/2

This is the first post in a three part series. I’m moving my Blacknight WordPress sites to Azure to see if it improves speed and if it’s cheaper. I’ll have to retain the Blacknight subscription while I have the domains registered with them. Will consider moving the domains to Azure using App Services Domain. This document will show you how to create a WordPress site on Azure App Services, you will use this site to test the redirect, access your DNS records in Blacknight, and configure and manage custom domains. In part 2 I will be investigating using Powershell to automate the renewal of SSL certificates. Azure might have some out of the box function for this but I haven’t checked yet. Enjoy.

[Note: The Blacknight specific sections for backing up your site have not been tested. So please verify that you back up properly before proceeding and consider special cases like out of date WordPress versions]

Creating a WordPress site on Azure App Services

  1. Navigate to portal.azure.com and log on.
  2. Input WordPress in the Search resources, services, and docs (G+/) search bar.
  3. Click WordPress under the Marketplace results.
  4. Create a name for your site. Note: The end result is your WordPress site URL so bear this in mind if you are not redirecting the site.
  5. Select all the defaults except for the Database Provider. From the Database Provider drop-down menu, select MySQL In App.
  6. Click App Service plan/Location and in the App Service plan/Location window click Create new. Note: The content in the App Service plan/Location window will disappear.
  7. In the WordPress window, click Create. Note: The application will take several minutes to build. To check the build status, click the notification icon.
  8. Click the notification icon and if the build is complete, click Go to resource.
  1.  

Finding your WordPress site ID in Blacknight

You need your WordPress ID to download your database and backup your WordPress site. To find your WordPress site ID complete the following steps:

  1. Navigate to www.blacknight.com and log on.
  2. Click Websites, and click the relevant website.
  3. Click Web Applications.
  4. Copy the number under the ID column.

Downloading your WordPress database from Blacknight

  1. Navigate to www.blacknight.com and log on.
  2. Click Websites, and click the website you want to redirect.
  3. Navigate to More Services and click Databases.
  4. In the Database name column, look for a name that contains your WordPress site ID and click it.
  5. Click the Browser database manager URL. This brings you to phpMyAdmin.
  6. Click Export.
  7. Click Go.

Restoring your SQL database in Azure

  1. In Azure navigate to Home > [your WordPress site] App Service.
  2. In the App Service menu click MySQL In App.
  3. Click Manage. This brings you to phpMyAdmin.
  4. Click Import.
  5. Navigate to Browse your computer and click Choose File
  6. Select your SQL backup file.
  7. Click Go.

Connecting to your Blacknight FTP and backing up your WordPress site

  1. Navigate to www.blacknight.com and log on.
  2. Click Websites, and click the website you want to access using FTP.
  3. Click FTP Access.
  4. Copy the FTP Server link.
  5. Open Windows Explorer.
  6. Paste the link in the address bar.
  7. Navigate to webspace/siteapps/WordPress-[your ID].
  8. Create a folder on your desktop called Temp Backup Folder.
  9. Copy the WordPress-[your ID] folder and paste it into the Temp Backup Folder.

Connecting to your Azure FTP

  1. In Azure navigate to Home > [your WordPress site] App Service.
  2. Click Get publish profile. This downloads your FTP details.
  3. Open the file in your preferred editor.
  4. Copy the publishUrl and paste it into Windows Explorer.
  5. To find your username and password, search for userName and userPwd.

Migrating your Blacknight backup to Azure via FTP

  1. Navigate to your Temp Backup Folder on the desktop and go to htdocs: Temp Backup Folder\WordPress-[ID]\htdocs.
  2. Paste the files into your Azure FTP site/wwwroot folder.

Note: If you are having trouble copying the files and folders, migrate them one at a time to see which one is causing the problem.

Accessing your DNS records in Blacknight

  1. Open a new tab, navigate to www.blacknight.com and log on.
  2. Click Websites, and click the website you want to redirect.
  3. Click the DNS tab.
  4. Click DNS records.
  5. Click Add New DNS Record.
  6. In the DNS Record Type drop-down menu select CNAME.
  7. You can leave the Domain field blank or input www.
  8. In the Canonical name field, input the domain you want to redirect it to. For example, [your site].azurewebsites.net. You must include a period at the end of your URL.

Note: “DNS record successfully scheduled for addition.” should appear. If not, contact Blacknight for information on deactivating your other nameservers.

Configuring and managing Azure Custom domains

  1. In Azure navigate to Home > [your WordPress site] App Service.
  2. In the App Service menu click Custom domains.
  3. In the Custom domains page of the app, add the fully qualified custom DNS name www.[yoursite].[your TLD] to the list.
  4. Click the + icon next to Add custom domain.
  5. Enter your fully qualified domain name, for example, www.[yoursite].[your TLD].
  6. Click Validate.
  7. Make sure that Hostname record type is set to CNAME (www.example.com or any subdomain).
  8. Click Add custom domain. It might take some time for the new custom domain to be reflected in the app’s Custom domains page. Try refreshing the browser to update the data.

Note: Depending on your DNS provider it can take up to 48 hours for the DNS entry changes to propagate. To verify that the DNS propagation is working as expected navigate to http://digwebinterface.com

Write an Alexa skill in 15 minutes

Well, it took my husband, who has no Alexa skills experience, 15 minutes. So if you have 15 minutes, and some development skills (he has 7 years of software engineering and architecture) this is the tutorial for you. If you have zero experience it might take you 30 minutes, it might take an hour, more, who cares, you get to show off a fully fledged Alexa skill! How cool is that?! Please do try it, and if you need any assistance or clarification, just ask.

I created a Github repository that has all you need to get started. The only prerequisite is an AWS account. On my Github tutorial you can find, instructions, an index.js file, and a messageResponses.js file. When you have the whole thing up and running I suggest changing some of the content around, and maybe adding in some more. I’ll be disabling comments because of spam but I would love to hear what you think so send me a message on whatever platform I post this on. 

https://github.com/nic-name/alexa_tutorial 

Part 3: Setting up a lab – Installing Windows 95 on Virtual Box


This one is purely for nostalgia purposes. Installing Windows 95 on VirtualBox. There’ll be a second part to this -connecting to the Internet. I am too weary after writing this not-so-concise tutorial to cram it into the one tutorial. FYI there’s no Solitaire on this. That might be the part 3. Don’t forget when you boot up for the first time to have the volume up so you can listen to the infamous startup sound. It’s worth the drama.

  1. Navigate to https://winworldpc.com/product/windows-95/osr-2 download the Windows 95 floppy disc and CD files:
    1. Windows 95 OSR2 (OEM) (3.5-DMF)
    2. Windows 95 OSR2 (OEM) (ISO)
  2. To install Windows 95 on VirtualBox, click New.
  3. Name the machine Windows 95.
  4. In the Type: field select Microsoft Windows.
  5. In the Version: field select Windows 95.
  6. Configure RAM to 256MB and click Next.
  7. In the rest of the Wizard accept all defaults.
  8. Power off your virtual machine.
  9. Right-click your virtual machine and select Settings.
  10. Navigate to System > Acceleration and deselect Enable VT-x/AMD-V.
  11. Navigate to Storage and click Empty under Controller: Floppy and click on the virtual floppy disk icon under Attributes.
  12. Select Microsoft Windows 95B (4.00.1111.osr2) (3.5)\Boot.img.
  13. Click Empty under Controller: IDE and click on the virtual optical disk icon under Attributes.
  14. Select Microsoft Windows 95B (4.00.1111) (OSR2) [English] (CD)\windows95b.iso.
  15. Click OK.
  16. Turn on your virtual machine.
  17. Choose Start computer without CD-ROM support.
  18. To partition your virtual drive execute the following command fdisk and press ENTER.
  19. In Do you wish to enable large disk support, type Y and press ENTER.
  20. In FDISK Options select 1. Create DOS partition or Logical DOS Drive.
  21. In Create DOS Partition or Logical DOS Drive select 1. Create Primary DOS Partition.
  22. Type Y and press ENTER.
  23. Restart your virtual machine by navigating to Input > Keyboard > Insert CTRL+ALT+DEL.
  24. To format your drive execute the following command format c:.
  25. In Proceed with Format select Y.
  26. Press ENTER.
  27. Restart your virtual machine by navigating to Input > Keyboard > Insert CTRL+ALT+DEL.
  28. Note your drive letter, for example Drive E: = Driver MSCD001 unit 0.
  29. Run the following command to copy the files from the Windows 95 disc to your C: drive, replacing R: with whatever drive letter corresponds to your virtual disc drive xcopy R:\ C:\INSTALL\ /S.
  30. Navigate to your install folder by executing the following commands:
    1. c:
    2. cd INSTALL
    3. setup
  31. Press ENTER.
  32. Click EXIT.
  33. To begin setup click Continue.
  34. Accept all of the defaults.
  35. Enter the number found on your Certificate of Authenticity and click Next.
  36. Enter your user information and click Next.
  37. In the Analyzing Your Computer window check Network Adapter and Sound, MIDI, or Video Capture Card and click Next.
  38. In Windows Components select Install the most common components (recommended) and click Next.
  39. In Startup Disk select No, I do not want a startup disk and click Next.
  40. In Finishing Setup click Finish.
  41. Windows will prompt you to restart the machine and remove the floppy disk from your computer. To do this, click Devices > Floppy Drive > Remove Disk From Virtual Drive. Click OK.

Part 2: Setting up a lab – Metasploitable


I’m going to build my lab piece by piece and create a tutorial on how I do it. If you want to follow sequentially, please refer first to my previous post https://www.girlfromtomorrow.com/technical-tools/installing-kali-linux-on-virtualbox/ to start.

To run Metasploitable on VirtualBox complete the following steps:

  1. Navigate to https://information.rapid7.com/download-metasploitable-2017.html complete the form and click SUBMIT.
  2. Download the folder.
  3. Unzip the folder.
  4. To install Metasploitable on VirtualBox, click New.
  5. Name the machine Metasploitable.
  6. In the Type: field select Linux.
  7. In the Version: field select Ubuntu.
  8. Configure RAM and click Next.
  9. In the Hard disk window select Use an existing virtual hard disk file and navigate to your Metasploitable download.
  10. Click Create.
  11. Log on using the following credentials:
    1. Username: mfsadmin
    2. Password: mfsadmin

Art and code

My masters in Digital Arts and Humanities at UCC taught me a lot about creative applications for technology. In our History and Theory of Digital Art module we were tasked with creating digital art. Digital Distortion is a commentary on how we represent ourselves on social media. Everything we put up is carefully curated by ourselves with our digital selves ending up much further away from our actual selves. To represent this I chose to put my own image through a number of processes both digital and analogue until almost unrecognisable and use as many of my own digital image processing skills as possible.

ART LINK: https://youtu.be/7P0gkptT2LY [Turn on closed captions]

CODE LINK: https://github.com/nic-name/glitch-art

Photography
Using a geometric patterned background, I took a large amount of “selfies” as an homage to the popular social media technique. The background image used is deliberately unnatural to further show how we are distorted on social media. All of the selfies were then heavily filtered to the same level as my social media pictures. Angles were carefully chosen to display my social self in the best possible light. I included one picture taken through a mirror to analogise self-reflection – when you look at your social media self you see it in black and white and can be aware of the distortion but blinded by the beauty of this carefully curated self.

Digital Process
I used three separate means to create the glitch, Notepad++, Audacity, and a bespoke Python glitch program that I wrote myself for this project.

Analogue: The piece Analogue was created using Notepad++, the image was converted into a RAW file and then opened as a .txt file in Notepad++. Data was deleted, copied and pasted, added, until a desired glitch effect was noticed.

Echo: The piece Echo was created using sound engineering software Audacity. The RAW file was imported into the software and an echo filter was applied to the resulting “audio” waves that were generated by the import.

Faces: The piece Faces was also created using Audacity, this time multiple filters were applied to the RAW file before it was then exported and converted back into a JPEG.
Algorithm: Algorithm was created by me using Python. I wrote a program imageprocessing.py that takes in an image that contains an algorithm that selects a random array of pixels and places them in another random location creating a glitch effect.

Inversion: Inversion was created using another method in the imageprocessing.py program I wrote. This takes all the RGB values of a pixel and inverts them to create the colour effect. I also applied the same effect used in the piece Algorithm for further distortion

Grey: Grey, a method in imageprocessing.py takes all the RGB values of a pixel and divides them by 3, creating a grayscale effect. I also applied the same effect used in the piece Algorithm for further distortion.

Music
I converted my own images into sound, using the RAW files of the images to create a sonic landscape for my art. All sounds are made using clips from my own photos which were further distorted in Audacity using effects.

Part 1: Setting up a lab – Installing Kali Linux on VirtualBox

Here’s the concise tutorial you’ve been waiting for. This tutorial is written for Windows 10 and can possibly be adapted.

Prerequisites

  • Your personal machine
  • Ethical hacking knowledge – know what you legally and ethically can and cannot do

Installing VirtualBox on Windows 10

  1. Navigate to https://www.virtualbox.org/wiki/Downloads.
  2. Under VirtualBox 6.0.4 platform packages click Windows hosts.
  3. Run the installer.
  4. To select default settings click Next in the Wizard until installation begins.

Setting up your virtual machine

  1. Open VirtualBox and click New.
  2. In the Name and operating system window change the name to something identifiable, for example, Kali.
  3. Change the Type to Linux.
  4. Change the Version to Debian (32-bit or 64-bit depending on your machine) and click Next.
  5. Configure the Memory size or click Next to accept the default.
  6. In Hard disk, select Create a virtual disk now and click Create.
  7. In Hard disk file type, select VDI (VirtualBox Disk Image) and click Next.
  8. In Storage on physical hard disk, select Dynamically allocated and click Next.
  9. Configure the File location and size or click Create to accept the default.

Installing Kali

  1. Navigate to https://www.kali.org/downloads/  and download Kali Linux 64 Bit .
  2. Open VirtualBox.
  3. To power on your virtual machine double-click its icon.
  4. In the Select start-up disk window browse to the location of your Kali image.
  5. Click Start.
  6. In the Boot menu select INSTALL.

The end.

If you have issues, let me know and I’ll consider compiling a troubleshooting guide.