Saturday, August 18, 2018

HowTo: Install MediaWiki on Ubuntu Server 18.04 LTS

References Prerequisites
  • A working installation of Ubuntu Server
  • LAN access to Ubuntu Server
Install Apache2
  • sudo apt install apache2 -y
  • Disable directory listing
    sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/apache2/apache2.conf
  • Set Apache2 service to start on boot
    sudo systemctl stop apache2.service 
    

    sudo systemctl start apache2.service

    sudo systemctl enable apache2.service
Install MariaDB 10.3
  • Add repo
    sudo apt-get install software-properties-common
    

    sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8

    sudo add-apt-repository 'deb [arch=amd64,arm64] http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.3/ubuntu bionic main'
  • Update to see new packages
    sudo apt update
  • Install
    sudo apt install mariadb-server mariadb-client -y
    Set root password for MariaDB
  • Set MariaDB service to start on boot
    sudo systemctl stop mariadb.service
    

    sudo systemctl start mariadb.service

    sudo systemctl enable mariadb.service
  • Lock it down! (answer Y to all)
    sudo mysql_secure_installation
  • Restart MariaDB service
    sudo systemctl restart mariadb.service
Install PHP 7.1
  • Add repo
    sudo add-apt-repository ppa:ondrej/php
  • Update to see new packages
    sudo apt update
  • Install all the things!
    sudo apt install php7.1 libapache2-mod-php7.1 php7.1-common php7.1-mbstring php7.1-xmlrpc php7.1-soap php7.1-gd php7.1-xml php7.1-intl php7.1-mysql php7.1-cli php7.1-curl
  • Open php.ini for editing
    sudo nano /etc/php/7.1/apache2/php.ini
  • Make the following changes
    file_uploads = On
    
    allow_url_fopen = On
    memory_limit = 256M
    upload_max_filesize = 100M
    max_execution_time = 360
    date.timezone = America/Pacific
Create the MediaWiki Database
  • Log on to the db server
    sudo mysql -u root -p
  • Create db
    CREATE DATABASE mediawiki;
  • Create db user
    CREATE USER 'mediawikiuser'@'localhost' IDENTIFIED BY 'new_password_here';
  • Grant user full access
    GRANT ALL ON mediawiki.* TO 'mediawikiuser'@'localhost' IDENTIFIED BY 'user_password_here' WITH GRANT OPTION;
  • Save and exit
    FLUSH PRIVILEGES;
    EXIT;
Download MediaWiki 1.31.0
  • Download the tarball
    cd /tmp && wget https://releases.mediawiki.org/mediawiki/1.31/mediawiki-1.31.0.tar.gz
  • Extract and move to www
    sudo tar -zxvf mediawiki*.tar.gz
    

    sudo mkdir -p /var/www/html/mediawiki

    sudo mv mediawiki-1.29.0/* /var/www/html/mediawiki
  • Modify permissions
    sudo chown -R www-data:www-data /var/www/html/mediawiki/
    

    sudo chmod -R 755 /var/www/html/mediawiki/
Configure Apache2
  • Create and edit conf file
    sudo nano /etc/apache2/sites-available/mediawiki.conf
  • Add conf
  • Create db user
    CREATE USER 'mediawikiuser'@'localhost' IDENTIFIED BY 'new_password_here';
  • Grant user full access
    GRANT ALL ON mediawiki.* TO 'mediawikiuser'@'localhost' IDENTIFIED BY 'user_password_here' WITH GRANT OPTION;
Enable MediaWiki Site && Restart Apache2
  • sudo a2ensite mediawiki.conf
    

    sudo a2enmod rewrite

    sudo systemctl restart apache2.service
The Finish Line
  • You should now be able to visit the MediaWiki page by navigating to http://server.ip.address/mediawiki
  • From here, simply follow the GUI installation process. Once the installation process is complete, you will need to move the LocalSettings.php file created into the MediaWiki directory on the server (default: /var/www/html/mediawiki)

Friday, August 17, 2018

Kali 2018.2 Post-Install Guide

Quick Links Disable Screenlock Install Software Upgrade && Cleanup
  • apt–get clean && apt–get update && apt–get upgrade –y && apt–get dist–upgrade –y && apt autoremove

Useful Server 2016 (Core) Commands

Basic
  • At boot, a cmd.exe window will open, type
    powershell
    and hit enter. You should now see a 'PS' before the path
  • To return to cmd simply type
    cmd
    and hit enter. This will drop you back into cmd, and you will not see the 'PS' before the path
  • Logoff
    logoff
  • Restart
    restart-computer
  • Shutdown
    stop-computer
  • Rename
    rename-computer -newname nameyouchoose -computername .
  • Task Manager
    start-process taskmgr
Administration
  • Check free disk space
    get-psdrive
  • Server Configuran Utility
    sconfig
  • Enable Remote Shell
    winrm quickconfig
More Info

Thursday, September 14, 2017

Windows Defender Vulnerability CVE-2017-0290

Ensure Window Defender is disabled
  1. Open cmd.exe
  2. Run
    sc query "windefend"
  3. Check "state", you should see "1 STOPPED"
  4. If not stopped, run
    sc config "windefend" start= disabled 
    sc stop "windefend"

Monday, May 8, 2017

HowTo: Add Syntax Highlighting for Cisco IOS to Notepad++

Notes
  • If you have existing user-defined languages in Notepad++, simply append the file instead of replacing it entirely
Config
  1. Download this style definition file userDefineLang.xml
  2. Close Notepad++ if open
  3. Save to
    %APPDATA%\Notepad++\userDefineLang.xml
  4. Start Notepad++ and open an ASA config file
  5. Choose Language → Cisco IOS
  6. Your config file should now look similar to this

Thursday, May 4, 2017

HowTo: Install Gnome Desktop on Ubuntu 16.04 LTS

Notes
  • There are several tutorials that will tell you to add Gnome PPAs, these are no longer supported in 16.04 LTS as of 04/2017.
  • This post assumes you'll be using only Gnome, if you want to run both Unity and Gnome, choose "lightdm" as the display manager.
  • Unity will be replaced by Gnome in 18.04
Installation
  1. Update packages
    sudo apt update
  2. Install Gnome
    sudo apt-get install ubuntu-gnome-desktop -y
  3. Choose "gdm3" as the display manager when prompted
  4. Restart
  5. After logon, you should be presented with your new Gnome desktop

Tuesday, May 2, 2017

Error - mount: unknown filesystem type 'exfat'

  1. Check to see if exfat drivers are installed
    dpkg -l | grep 'exfat'
  2. If not installed, run
    sudo apt-get install exfat-fuse exfat-utils