<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Hansi Tech Blog]]></title><description><![CDATA[Hello, World! Welcome to my technical blog! I’ll share insights on cybersecurity, AI, DevOps, Linux, cloud, email, and software development to help you tackle r]]></description><link>https://blog.hans.co.nz</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 18:41:41 GMT</lastBuildDate><atom:link href="https://blog.hans.co.nz/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Generative AI in Cybersecurity: Opportunities and Emerging Threats]]></title><description><![CDATA[Generative Artificial Intelligence (AI) is reshaping cybersecurity in ways that were once unimaginable. Based on my recent research for my Master's study at Auckland University of Technology, this blog explores how generative AI is creating both new ...]]></description><link>https://blog.hans.co.nz/generative-ai-in-cybersecurity-opportunities-and-emerging-threats</link><guid isPermaLink="true">https://blog.hans.co.nz/generative-ai-in-cybersecurity-opportunities-and-emerging-threats</guid><category><![CDATA[AI]]></category><category><![CDATA[#cybersecurity]]></category><category><![CDATA[generative ai]]></category><dc:creator><![CDATA[Hans Wang]]></dc:creator><pubDate>Tue, 29 Apr 2025 02:22:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1745893249394/b148fcbd-d095-4d4c-9fc3-d96ab6f96170.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Generative Artificial Intelligence (AI) is reshaping cybersecurity in ways that were once unimaginable. Based on my recent research for my Master's study at Auckland University of Technology, this blog explores how generative AI is creating both new opportunities and serious challenges in the field of cybersecurity.</p>
<p>Generative AI, including models like GANs and Transformers, is being integrated into cybersecurity defence strategies to strengthen threat detection, improve data handling, and protect privacy. Techniques such as adversarial training help security systems detect and resist sophisticated attacks, while AI-generated datasets are balancing training data to improve the accuracy of intrusion detection systems (IDS). Generative AI also plays a key role in privacy protection through data obfuscation, masking sensitive information while maintaining the statistical value of datasets.</p>
<p>However, the same technologies are also being exploited by cybercriminals. Generative AI enables attackers to launch more stealthy and effective attacks, including adversarial input perturbations that fool AI models, poisoning training datasets to degrade system performance, and launching sophisticated spoofing and deepfake attacks to bypass security controls. These evolving tactics make cybersecurity defence increasingly complex.</p>
<p>In addition to technical challenges, generative AI raises significant legal and ethical concerns. Existing regulations like GDPR and CCPA are not fully equipped to address AI-driven threats like deepfake fraud, misinformation, or AI-augmented cyberattacks. Clearer governance, accountability, and updated legal frameworks are urgently needed.</p>
<p><strong>Conclusion:</strong><br />Generative AI presents a double-edged sword for cybersecurity. It offers powerful tools for defence, but also introduces unprecedented risks. Organizations must innovate continuously, combining AI-driven defences with strong ethical standards and proactive regulatory strategies to stay ahead in an evolving threat landscape.</p>
]]></content:encoded></item><item><title><![CDATA[Setting Up OpenVPN on Hostinger: A Reliable VPN Solution]]></title><description><![CDATA[OpenVPN, a widely trusted open-source VPN protocol, provides a strong encryption framework to keep your online activity private. In this blog, I’ll share my experience setting up OpenVPN on a Hostinger VPS using their OpenVPN template. Especially for...]]></description><link>https://blog.hans.co.nz/setting-up-openvpn-on-hostinger-a-reliable-vpn-solution</link><guid isPermaLink="true">https://blog.hans.co.nz/setting-up-openvpn-on-hostinger-a-reliable-vpn-solution</guid><category><![CDATA[vpn]]></category><category><![CDATA[OpenVPN]]></category><category><![CDATA[china]]></category><category><![CDATA[internet]]></category><dc:creator><![CDATA[Hans Wang]]></dc:creator><pubDate>Tue, 18 Feb 2025 07:11:41 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1739862556705/58bec4a9-8bf9-43d1-96db-5219515d575d.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>OpenVPN, a widely trusted open-source VPN protocol, provides a strong encryption framework to keep your online activity private. In this blog, I’ll share my experience setting up OpenVPN on a Hostinger VPS using their OpenVPN template. Especially for people traveling to China, which has a restrictive internet policy, a reliable VPN solution is essential. After testing, I can confirm that it works smoothly, even in China.</p>
<h2 id="heading-why-openvpn-on-hostinger"><strong>Why OpenVPN on Hostinger?</strong></h2>
<p>Hostinger offers a pre-configured OpenVPN template that simplifies the deployment process. Unlike manually setting up OpenVPN from scratch, this template eliminates complex configurations, making it an ideal choice for users who want a quick and secure VPN solution.</p>
<p>Key benefits of using OpenVPN on Hostinger include:<br />✅ Pre-installed OpenVPN package for easy setup<br />✅ Full control over your VPN server<br />✅ Secure encryption for online privacy<br />✅ Works effectively in China (tested and verified)</p>
<h2 id="heading-setting-up-openvpn-on-hostinger"><strong>Setting Up OpenVPN on Hostinger</strong></h2>
<p>Setting up OpenVPN on Hostinger is a straightforward process thanks to their ready-to-use template. It eliminates the hassle of manual configuration while providing a secure and customizable VPN solution. If you’re interested in setting up OpenVPN on your VPS, you can follow Hostinger’s official guides here:</p>
<p>🔗 <strong>How to Use the OpenVPN VPS Template</strong><br /><a target="_blank" href="https://support.hostinger.com/en/articles/8710637-how-to-use-the-openvpn-vps-template">https://support.hostinger.com/en/articles/8710637-how-to-use-the-openvpn-vps-template</a></p>
<p>🔗 <strong>How to Change the Operating System of Your VPS</strong><br /><a target="_blank" href="https://support.hostinger.com/en/articles/4965922-how-to-change-the-operating-system-of-your-vps">https://support.hostinger.com/en/articles/4965922-how-to-change-the-operating-system-of-your-vps</a></p>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>Whether you're looking to protect your online privacy, bypass restrictions, or access geo-blocked content, this setup delivers a reliable and efficient VPN experience.</p>
<p>🔥 <strong>Get 20% Off on Hostinger VPS</strong> 🔥<br />Use the following referral link to get <strong>20% off</strong> on your Hostinger VPS setup:<br />👉 <a target="_blank" href="https://hostinger.com?REFERRALCODE=T2UHANS06FYD">https://hostinger.com?REFERRALCODE=T2UHANS06FYD</a></p>
]]></content:encoded></item><item><title><![CDATA[Automating JPEG Recovery and EXIF Metadata Extraction with Bash Scripting]]></title><description><![CDATA[This is another study from my Master’s in Cyber Security and Digital Forensics program at Auckland University of Technology. This article focuses on digital forensics, which often requires the recovery of lost images and metadata for investigations. ...]]></description><link>https://blog.hans.co.nz/automating-jpeg-recovery-and-exif-metadata-extraction-with-bash-scripting</link><guid isPermaLink="true">https://blog.hans.co.nz/automating-jpeg-recovery-and-exif-metadata-extraction-with-bash-scripting</guid><category><![CDATA[#photorec]]></category><category><![CDATA[Bash]]></category><category><![CDATA[forensics]]></category><category><![CDATA[sha 1]]></category><category><![CDATA[hash functions, MD5, SHA-1, SHA-2, checksum]]></category><dc:creator><![CDATA[Hans Wang]]></dc:creator><pubDate>Sun, 29 Dec 2024 06:46:08 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1735454424764/be79a3c9-5026-47d3-8289-3f8aa9e93f5a.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This is another study from my Master’s in Cyber Security and Digital Forensics program at Auckland University of Technology. This article focuses on digital forensics, which often requires the recovery of lost images and metadata for investigations. This blog highlights my research on automating JPEG recovery and EXIF metadata extraction using Bash scripting, a critical tool for digital forensic analysis.</p>
<p>The research developed a script named “<a target="_blank" href="http://recover.sh">recover.sh</a>,” combining the power of Photorec for file recovery and ExifTool for metadata extraction. By processing a .dd disk image, the script efficiently recovered JPEG files and extracted critical metadata, including GPS location, camera details, and timestamps. To ensure data integrity, MD5 and SHA-1 hash algorithms verified that files remained unaltered during recovery and analysis.</p>
<p>Here’s the full Bash script used in the research:</p>
<pre><code class="lang-plaintext">#!/bin/bash

# Create a directory to store recovered JPEGs and initialize an EXIF data table
mkdir -p /root/Documents/jpegs
table_file=/root/Documents/jpegs/"exif_data.txt"
echo "File Name, GPS Position, Make, Model, Create Date, Modify Date" &gt;"$table_file"

# Recover JPEG files using Photorec
photorec /d /root/Documents/ /root/Documents/dataset.dd

# Generate MD5 and SHA-1 hashes for recovered files
md5sum /root/Documents/recup_dir.*/f*.jpg &gt;&gt; /root/Documents/STEM/MD5_recovered.txt
sha1sum /root/Documents/recup_dir.*/f*.jpg &gt;&gt; /root/Documents/STEM/SHA-1_recovered.txt

# Move recovered files to the main directory
cp /root/Documents/recup_dir.*/f*.jpg /root/Documents/jpegs

# Generate MD5 and SHA-1 hashes for copied files
md5sum /root/Documents/jpegs/f*.jpg &gt;&gt; /root/Documents/STEM/MD5_copied.txt
sha1sum /root/Documents/jpegs/f*.jpg &gt;&gt; /root/Documents/STEM/SHA-1_copied.txt

# Extract EXIF metadata for each JPEG and append to the EXIF data table
for file in /root/Documents/jpegs/*.jpg; do
  filename=$(basename -- "$file")
  gps_position=$(exiftool -c %.6f -GPSPosition "$file")
  make=$(exiftool -Make "$file")
  model=$(exiftool -Model "$file")
  create_date=$(exiftool -CreateDate "$file")
  modify_date=$(exiftool -ModifyDate "$file")
  echo "$filename, $gps_position, $make, $model, $create_date, $modify_date" &gt;&gt;"$table_file"
done
</code></pre>
<p>The script successfully recovered 34 of 35 JPEG files and extracted EXIF metadata for most. This process significantly streamlines traditional manual methods, offering reliability and efficiency. This simple script helps achieve automation in recovering JPEG files and enhances skills in scripting.</p>
]]></content:encoded></item><item><title><![CDATA[Mitigating Ransomware Attacks Through Email Security - Study from MCSDF]]></title><description><![CDATA[From today, I want to share insights from my studies in the Master of Cyber Security and Digital Forensics program at Auckland University of Technology. This article focuses on mitigating ransomware attacks through email security.
Ransomware has evol...]]></description><link>https://blog.hans.co.nz/mitigating-ransomware-attacks-through-email-security-study-from-mcsdf</link><guid isPermaLink="true">https://blog.hans.co.nz/mitigating-ransomware-attacks-through-email-security-study-from-mcsdf</guid><category><![CDATA[email]]></category><category><![CDATA[ransomware]]></category><category><![CDATA[email security]]></category><category><![CDATA[#cybersecurity]]></category><dc:creator><![CDATA[Hans Wang]]></dc:creator><pubDate>Sun, 22 Dec 2024 00:16:01 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1734826425943/5f0aa2ae-5686-4c16-9d08-5e90c3e3d861.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>From today, I want to share insights from my studies in the Master of Cyber Security and Digital Forensics program at Auckland University of Technology. This article focuses on mitigating ransomware attacks through email security.</p>
<p>Ransomware has evolved into one of the most destructive cyber threats, with Ransomware-as-a-Service (RaaS) making it accessible even to non-technical actors. Many ransomware attacks start with phishing emails, exploiting weak email security protocols to launch devastating campaigns.</p>
<p>A ransomware attack typically involves embedding malicious links or attachments in phishing emails. When clicked, these activate "drive-by downloads" or deliver hidden payloads through techniques like steganography. Once executed, ransomware encrypts critical data and demands a ransom for decryption, often causing irreversible reputational, financial, and legal damage.</p>
<p>Mitigating ransomware requires robust email security practices aligned with the OSI model. At the application layer, protocols like SPF, DKIM, and DMARC authenticate email legitimacy. At the transport layer, enabling Transport Layer Security (TLS) ensures encrypted communication. At the network layer, secure protocols like HTTPS and IMAPS add extra protection, while email gateways filter potential threats.</p>
<p>Organizations must also monitor traffic patterns for anomalies, regularly update software, and educate staff on phishing risks. Proactive measures not only strengthen resilience against ransomware but also safeguard sensitive data from theft or misuse.</p>
<p>Ransomware prevention begins with secure email practices, ensuring a strong line of defense against evolving cyber threats.</p>
]]></content:encoded></item><item><title><![CDATA[Setting Up Your Email Server with Mailcow: Challenges and Lessons Learned]]></title><description><![CDATA[Setting up your own email server is a rewarding but challenging project. In this post, I’ll share my experience configuring a Mailcow email server from scratch. I’ll walk you through the process, highlight common hurdles like port 25 restrictions on ...]]></description><link>https://blog.hans.co.nz/title-setting-up-my-your-email-server-with-mailcow-challenges-and-lessons-learned</link><guid isPermaLink="true">https://blog.hans.co.nz/title-setting-up-my-your-email-server-with-mailcow-challenges-and-lessons-learned</guid><category><![CDATA[email]]></category><category><![CDATA[email security]]></category><category><![CDATA[email server]]></category><category><![CDATA[hostinger]]></category><category><![CDATA[dns]]></category><dc:creator><![CDATA[Hans Wang]]></dc:creator><pubDate>Mon, 16 Dec 2024 00:51:47 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1734310944473/7fb7c1ab-944e-4fe1-9744-675f83303d06.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Setting up your own email server is a rewarding but challenging project. In this post, I’ll share my experience configuring a Mailcow email server from scratch. I’ll walk you through the process, highlight common hurdles like port 25 restrictions on AWS, Google Cloud, and some VPS providers, and explain why I ultimately chose Hostinger as my VPS provider. By the end of this guide, you’ll have a clear understanding of the steps involved, the difficulties to anticipate, and the lessons I learned along the way. If you’re considering hosting your own email server, this post is for you!</p>
<p><strong>1. Why Set Up Your Own Email Server?</strong></p>
<p>• Privacy, control, and independence.</p>
<p>• Avoid reliance on third-party providers.</p>
<p>• Learning opportunity for system admins and tech enthusiasts.</p>
<p><strong>2. Choosing the Right VPS Provider</strong></p>
<p>• Issues with AWS, Google Cloud, and most VPS providers blocking port 25.</p>
<p>• Why port 25 matters for email delivery.</p>
<p>• Why I chose Hostinger: No port 25 block, affordable, and beginner-friendly.</p>
<p><strong>3. Prerequisites</strong></p>
<p>• Basic understanding of Linux, Docker, and command-line tools.</p>
<p>• VPS instance with sufficient RAM (e.g., 4GB) and storage space.</p>
<p>• Domain name for email configuration (SPF, DKIM, DMARC, etc.).</p>
<p><strong>4. Step-by-Step Process</strong></p>
<p>1. <strong>Provision Your VPS</strong></p>
<p>• Set up a VPS with Hostinger (or any provider that doesn’t block port 25).</p>
<p>• Update and secure the server (firewall, SSH keys, etc.).</p>
<p>2. <strong>Install Docker &amp; Docker-Compose</strong></p>
<p>• Commands to install Docker and Docker-Compose on the server.</p>
<p>3. <strong>Install Mailcow</strong></p>
<p>• Clone Mailcow from GitHub.</p>
<p>• Run the docker-compose command to launch Mailcow.</p>
<p>4. <strong>DNS Configuration</strong></p>
<p>• Set up essential DNS records (SPF, DKIM, DMARC, MX).</p>
<p>• Verify that DNS changes propagate correctly.</p>
<p>5. <strong>Test Your Mail Server</strong></p>
<p>• Send a test email to check if it’s being delivered.</p>
<p>• Use tools like Mail Tester to verify SPF, DKIM, and DMARC compliance.</p>
<p>Self-hosting an email server is a rewarding learning experience for system administrators, security enthusiasts, and anyone passionate about mastering email infrastructure. While the process can be challenging, especially with port 25 restrictions and email authentication hurdles, choosing the right VPS provider can save you days of frustration. Hostinger, for instance, offers a simple path forward by not blocking essential ports. Be prepared for DNS propagation delays, which require patience as changes take time to reflect. Ultimately, the knowledge and skills you gain from this process are invaluable, equipping you to better understand email security, server configuration, and self-hosted solutions.</p>
]]></content:encoded></item></channel></rss>