Best of SecurityAugust 2024

  1. 1
    Article
    Avatar of hnHacker News·2y

    Server Setup Basics

    Setting up a robust server includes steps like configuring secure SSH login, creating non-root users, setting up NGINX, managing logs, and securing network ports with UFW and Fail2Ban. Additionally, best practices for backups and choosing the right tools for server management are emphasized. The use of tools like Btop, Neoss, GoAccess, MC, and NCDU is recommended for improving server management efficiency.

  2. 2
    Article
    Avatar of communityCommunity Picks·2y

    Securing Node.js in Production

    Ensuring the security of your Node.js application involves several advanced techniques such as avoiding root privileges, keeping npm libraries updated, customizing cookie names, implementing secure HTTP headers with Helmet.js, applying rate limiting, enforcing strong authentication policies, minimizing error details, vigilant monitoring, adhering to HTTPS-only policies, validating user input, and using security linters for automatic risk detection.

  3. 3
    Article
    Avatar of asayerasayer·2y

    Understanding Web Authentication

    Website authentication is crucial for ensuring users are who they claim to be, guarding sensitive information, and maintaining trust. Various authentication methods include password-based, multi-factor, biometric, token-based, and certificate-based authentication. Additionally, common protocols such as OAuth 2.0, OpenID Connect, SAML, and LDAP are used to manage authentication processes securely. Effective implementation involves choosing the right method for user experience and security, integrating both frontend and backend properly, and adhering to security best practices. Balancing security with usability and using adaptive authentication can further enhance security measures.

  4. 4
    Article
    Avatar of bytebytegoByteByteGo·2y

    EP124: How does SSH work?

    SSH (Secure Shell) is a protocol for securely connecting to remote machines over an unsecured network. It encrypts connections and offers various authentication and data transfer mechanisms. SSH-2, standardized by the IETF, features three main layers: Transport, Authentication, and Connection. The Transport Layer ensures secure communication, the Authentication Layer verifies user identities, and the Connection Layer multiplexes encrypted communication into multiple channels.

  5. 5
    Article
    Avatar of communityCommunity Picks·2y

    How to remove a leaked .env file from GitHub permanently...

    Learn how to remove a leaked .env file from your GitHub repository by removing it from the repository, deleting it from history using filter-branch, force pushing the changes, cleaning up the local repository, and revoking any leaked credentials.

  6. 6
    Article
    Avatar of hnHacker News·2y

    Tauri 2.0 Release Candidate

    Tauri 2.0 has reached its release candidate phase after extensive beta and alpha testing. The focus now is on documentation and fixing critical bugs before the stable release planned for the end of August. Significant changes include the restructuring of core plugins and improvements in mobile development capabilities. An external security audit has also been completed, with all findings addressed. The Tauri team encourages community involvement and contributions to help improve the project further.

  7. 7
    Video
    Avatar of fireshipFireship·2y

    Kim Dotcom is in mega big trouble

  8. 8
    Article
    Avatar of itnextITNEXT·2y

    Build your own Ad Blocking tool for your home using Pi-Hole.

    Pi-Hole is a DNS sinkhole designed to block advertisements and trackers on your home network, enhancing your online privacy. By routing DNS traffic through Pi-Hole, domains associated with ads and telemetry are blocked, providing an ad-free browsing experience. The post details the installation of Pi-Hole on a home server using Docker and Portainer, and explains how to configure your home router to use Pi-Hole. It also highlights the primary benefits and a few downsides of using Pi-Hole.

  9. 9
    Video
    Avatar of youtubeYouTube·2y

    NGINX Tutorial - What is Nginx

    NGINX is a versatile web server that offers functionalities like load balancing, caching, and enhanced security by acting as a proxy server. It can distribute incoming requests among multiple servers based on various algorithms, cache frequently accessed resources to improve efficiency, and consolidate security efforts by serving as the single entry point for web traffic. NGINX also supports encrypted communication and can compress large files to save bandwidth. It has become popular in container environments, especially as a Kubernetes Ingress controller.

  10. 10
    Article
    Avatar of cerbosCerbos·2y

    Authentication vs Authorization

    Understanding authentication and authorization is key to securing applications. Authentication verifies user identity, while authorization determines what authenticated users are allowed to do. Authentication methods include passwords and biometrics, whereas authorization relies on access control lists and roles. Effective authorization systems need to be scalable and flexible. Services like Cerbos offer robust, scalable solutions that enhance security by ensuring only permitted users access sensitive data.

  11. 11
    Article
    Avatar of communityCommunity Picks·2y

    PostgreSQL databases under attack

    Poorly protected PostgreSQL databases on Linux are being targeted by cryptojacking attackers. Aqua Security researchers observed attackers brute-forcing access credentials, creating new high-privilege user roles, removing superuser privileges from compromised roles, and downloading payloads that eliminate competing cryptomining malware. PostgreSQL databases, often found in cloud and on-premises environments, are frequent targets due to lax security or misconfigurations. To protect these databases, using firewalls, VPNs, SSH tunnels, strong passwords, audit logs, and intrusion detection systems is advised.

  12. 12
    Article
    Avatar of cerbosCerbos·2y

    3 Most Common Authorization Designs for SaaS Products

    Authorization is essential for securing SaaS applications, ensuring only authorized users access specific resources. This post details three common authorization models: Access Control List (ACL), Role-Based Access Control (RBAC), and Attribute-Based Access Control (ABAC). ACL is simple and quick but may require manual updates as the system scales. RBAC is more scalable, using roles to grant permissions, but can suffer from 'role explosion' as granular control increases. ABAC is the most complex and powerful, using contextual information and attributes to manage access dynamically. Organizations with complex needs might consider third-party solutions like Cerbos for easier implementation.

  13. 13
    Article
    Avatar of milanjovanovicMilan Jovanović·2y

    Improving Code Quality in C# With Static Code Analysis

    Static code analysis is a vital tool for improving code quality in C# projects. It helps detect issues related to security, performance, and coding style without running the code. The post covers how to set up static code analysis using built-in Roslyn analyzers in .NET, configure properties in `Directory.Build.props`, and leverage additional tools like `SonarAnalyzer.CSharp`. The process involves treating warnings as errors and customizing rules via `.editorconfig` to create secure, maintainable, and high-quality code.

  14. 14
    Article
    Avatar of arcjetArcjet·2y

    A Modern Approach to Secure APIs with Node.js, Express, TypeScript, and ESM

    Learn to build a modern, secure Node.js API with Express, TypeScript, and ESM. Configure TypeScript with Express, enable hot-reloading with nodemon, and secure your API using Arcjet for rate-limiting and bot protection. The guide includes steps to initialize a Node.js project, configure a TypeScript setup, set up an Express server, and integrate security measures while ensuring smooth development with hot-reloading.

  15. 15
    Video
    Avatar of an0n_aliAn0n Ali·2y

    20 Browser Extensions for HACKERS & OSINT!

  16. 16
    Article
    Avatar of PrismicPrismic·2y

    Next.js Cookies Guide: Pros, Cons, and Practical Implementation

    Cookies, though powerful for customization, session management, and tracking, raise privacy and security concerns. This guide explores both the benefits and drawbacks of cookies, and dives into a tutorial on implementing a theme switcher in a Next.js App Router project using cookies. By leveraging the Next.js `next/headers` package and Tailwind CSS, users can learn to manage cookies for theme preference, covering getting, setting, and deleting cookies.

  17. 17
    Article
    Avatar of communityCommunity Picks·2y

    Brief overview : AWS EC2 Instance Setup and Secure CI/CD Pipeline with Jenkins

    Setting up a secure and efficient CI/CD pipeline on AWS EC2 using Jenkins involves several key steps. Begin by provisioning an AWS EC2 instance and configuring it, followed by securing access through SSH. Install and configure Jenkins, including essential plugins for Docker, SonarQube, and security checks. Build a Jenkins pipeline with stages for workspace preparation, code checkout, static code analysis, and security scanning. Final steps include managing Docker images and deploying the application with reporting mechanisms for stakeholders.

  18. 18
    Article
    Avatar of PrismicPrismic·2y

    How to Add Authentication: Next.js and Auth0 - A Tutorial

    Adding authentication is crucial for application security, user identity verification, and data protection. This tutorial details how to integrate Auth0 with a Next.js project, covering the setup of Auth0 in the dashboard, installing the Next.js SDK, configuring the SDK, handling routes for login and logout, and creating protected routes. It provides a comprehensive guide to enable secure authentication and personalized user experiences in modern web applications.

  19. 19
    Video
    Avatar of developedbyeddevelopedbyed·2y

    Don't Make These 10 SQL Mistakes

    Learn about common SQL mistakes and how to avoid them to optimize your database performance. Key topics include selective data retrieval, the importance of proper indexing, preventing SQL injections, normalization practices, handling null values, proper use of update and delete clauses, understanding transactions, and ensuring accurate joins and aggregate functions.

  20. 20
    Article
    Avatar of devgeniusDev Genius·2y

    Why I Always Use PostgreSQL Functions For Everything

    The author advocates for using PostgreSQL functions for all database interactions to improve maintainability, readability, security, and availability. They provide a detailed analysis of encapsulating SQL queries within functions to define clear data contracts. The article also discusses handling legacy systems, managing the N+1 query antipattern, migrating to Timescale DB, and optimizing query performance. Additionally, the approach allows easy implementation of least privilege security by limiting database access to executing specific functions only.

  21. 21
    Article
    Avatar of hnHacker News·2y

    magic-wormhole/magic-wormhole: get things from one computer to another, safely

    Magic Wormhole is a tool and library for securely transferring files, directories, or text between computers using short, human-pronounceable codes. It operates with the help of two servers and is compatible with Python 3.8 and higher. Installation instructions and further documentation are available online.

  22. 22
    Article
    Avatar of systemweaknessSystem Weakness·2y

    Advanced Kali Linux Commands for Hacking and Penetration Testing

    This post highlights advanced Kali Linux commands crucial for penetration testers. It covers powerful tools like Nmap for network scanning, Metasploit Framework for exploitation, Aircrack-ng for wireless network cracking, Netcat for versatile networking tasks, Burp Suite for web application testing, and John the Ripper for password cracking. Each section includes advanced usage examples and explanations of specific commands.

  23. 23
    Article
    Avatar of systemweaknessSystem Weakness·2y

    Installing Wazuh on Ubuntu

    This guide explains how to install Wazuh, an open-source SIEM, on Ubuntu. It covers the steps to install both the Wazuh Manager and Wazuh Agent, including accessing the Wazuh dashboard and solving common issues such as port conflicts and dashboard accessibility. Detailed instructions and troubleshooting tips are provided to ensure a smooth installation process.

  24. 24
    Article
    Avatar of hnHacker News·2y

    dani-garcia/vaultwarden: Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs

    Vaultwarden is an unofficial Bitwarden-compatible server written in Rust, ideal for self-hosted deployments where the official service might be too resource-heavy. The project includes full Bitwarden API support, features like organizations, attachments, and U2F, and requires HTTPS for secure use of Web Crypto APIs in modern browsers. Users can configure the server with Docker and should report issues directly through designated community channels.

  25. 25
    Article
    Avatar of cerbosCerbos·2y

    401 vs 403 Error Codes: What's the Difference?

    HTTP error codes 401 and 403 are often confused but represent different issues. A 401 error means 'Unauthorized' and indicates the user needs to authenticate. A 403 error means 'Forbidden' and indicates the user is authenticated but doesn't have permission to access the resource. Understanding these differences helps in diagnosing and solving the issues accurately.