What are Java’s Access Modifiers and How to Use Them

In Java, access modifiers are keywords that determine the accessibility of classes, methods, and variables in an object-oriented program. There are four access modifiers in Java: Access modifiers are used to control the level of encapsulation of an object-oriented program and to restrict access to sensitive or implementation-specific details of the program. Here are some… read more »

Common Mistakes Which Leave a Linux Vulnerable

Securing a Linux system can be a complex task, and there are many potential pitfalls and mistakes that can compromise the system’s security. Here are some of the most common mistakes with examples: To improve the security of a Linux system, here are some best practices that you should follow: In summary, securing a Linux… read more »

When and How to Use Iptables and Ipsets

iptables and ipsets are both tools that are commonly used in Linux-based operating systems for managing network traffic. However, they serve different purposes and have different capabilities. iptables is a firewall tool that allows you to configure rules for filtering and manipulating network traffic. It uses a set of predefined chains (INPUT, OUTPUT, and FORWARD)… read more »

How to Develop Securely In Java

There are several good security practices to follow when developing Java applications. Here are some of the most important ones: By following these best practices, you can help ensure the security of your Java applications and protect against common security threats.

How to Protect the Class State from Unintended Changes in Java

In Java, objects can be classified as either mutable or immutable based on whether their state can be changed or not. A mutable object is one whose state can be modified after its creation. For example, an array can have its elements added, removed or modified after it has been created. On the other hand,… read more »

Introduction to Tengine Web Server

Tengine seems to be a popular web server for Chinese websites. I’ve come upon it while browsing through Aliexpress and stumbling upon a 404 error: This error and more specifically its footer “Powered by Tengine” stirred up my interest and so I started looking for more information about this unknown to me web server. Here… read more »

How to Secure an Outdated Web Application in 5 Minutes

I’ve had the following challenge yesterday. A friend of mine had an old Joomla 2.5 with a bunch of customization – additional components installed, custom theme, etc. It was hosted somewhere and had to be transferred away for some reasons. But before being transferred to a hosting which I am responsible for, it had to… read more »

AppArmor Php-Fpm Configuration with ChangeHat

AppArmor is the default Mandatory Access Control module on Ubuntu, SuSE and other Linux distributions. Thanks to it, you can limit the filesystem access of a process. There are already some good howtos for getting a basic setup of Apparmor for Php-fpm. Though, in cases such as that of running multiple sites securely with Php-fpm, you… read more »

How to Run Sites Securely with Apache and Php-fpm on Ubuntu 16.04 LTS

A great security feature of Php FastCGI Process Manager (Php-fpm) is its ability to run Php scripts with different users. This in addition to its other merits such as performance and many fine grained options for tuning makes it the best choice for running Php sites. Before anything else, I must admit that Nginx with… read more »

How to Install and Configure SuPHP

Notice: This article was written when  SuPHP was the most popular choice for running multiple PHP sites on the same Apache server. Now, php-fpm with different users is a better choice. But still, if you need this article, here it is… In short, SuPHP runs the PHP web scripts as a  predefined system user, respecting… read more »