October 21, 2024
Chicago 12, Melborne City, USA

security

Topics relating to application security and attacks against software. Please don’t use this tag alone, that results in ambiguity. If your question is not about

security

How to prevent terraform developers from viewing secrets with the nonsensitive function

It seems there’s a lot of information out there on how to retrieve and view sensitive data in terraform, but not a lot on how to prevent viewing of it via the nonsensitive function. For example, suppose I have a secret stored in Azure Key Vault and I want my config to grab it and

Read More
security

CSP blocking things it shouldn't

I’m getting reports that say our CSP policy is blocking domains it looks like it shouldn’t. blocked-uri: https://uploads..... effective-directive: img-src original-policy: img-src 'self' https: blob: data:; Why is the policy blocking the blocked-uri? I have a few different domains that seem like they should be allowed, but aren’t. You need to sign in to view

Read More
security

How to Track SSH Access by UserName (whoami) on an Ubuntu 22.04?

I am managing an Ubuntu 22.04 (AWS EC2) server. I am looking for a way to track SSH access to the server, specifically by obtaining the username (whoami) of the developer’s laptop when they connect via SSH. Is there a method or configuration that can help me identify who accessed the server based on their

Read More
security

Is exposing Authority, ClientID and Scope through unprotected endpoint secure?

Recently I found an unprotected endpoint in BFF API that exposes: ClientId Scope Authority Frontend consuming this endpoint uses this response to kick off AuthorizationCode + PKCE flow. Is this secure? You need to sign in to view this answers

Read More
security

How to protect sensitive user-configurable settings in a WordPress plugin?

I am creating a WordPress plugin that query a third-party API using an authentication token. The plugin requires the website administrator/plugin user to configure the token. In its current state, the plugin exposes the token in a settings page which stores the value in the wp_options table. Here is a simplified version: class Foobar_Plugin {

Read More
security

How to securely store RSA private keys

I’m building a chat application which uses RSA encryption for the majority of its encryption needs. I’d like to allow users to log in from anywhere with a username and password, but this means the client doesn’t have immediate access to the private key, meaning it would need to be stored server-side. So my question

Read More
security

can't get accessToken with client-credentials grant_type with spring-authorization-server

env: java: 17 spring boot: 3.3.4 spring security: 6.3.3 spring authorization server: 1.3.2 i configured the authorization server like below with new version of spring-authorization-server library. i sent the request with postman which has correct client id and client secret parameter with the server. but can’t get the access Token. reference is few. and can’t

Read More
security

exploit the vulnerability of a program to get code (in C)

#include <stdio.h> #include <string.h> #include <stdlib.h> char secret_message[8]; #define MAX_USERS 4 #define NAME_SIZE 8 struct Name { char name[NAME_SIZE]; }; struct NameList { unsigned long int user_num; struct Name users[MAX_USERS]; }; void view_user(char* data) { // this function's source code is irrelevant to the task requirements // it does pretty output of the data in

Read More
security

How can I securely handle file uploads in Express and store the file metadata in MongoDB?

The details of my problem revolve around securely handling file uploads in an Express application. Specifically: Security Concerns: I want to ensure that my current approach to file uploads is secure, and I’m not exposing the application to potential vulnerabilities like malicious file uploads (e.g., executable files disguised as images). Validation and Sanitization: I’m unsure

Read More
security

Oauth2. How does server understand 'state' is belonging to a valid public client?

I am trying to understand how exactly state benefits Oauth flow by preventing CSRF. I just don’t understand what the client server is comparing the state in the URL to. I have seen such an example: Alice, good.com – good. Mallory, bad.com – bad. google.com – auth server. Alice is already authorized in good.com via

Read More