instruction
stringlengths
24
29.9k
Does Tor use Ephemeral DH, Static DH or Anonymous DH? I have heard that the latter two are not secure so I am worried if Tor uses them.
Because HTTP(s) is stateless, it doesn't remember a username/password combination used to authenticate and assign permissions to a user. I've read that, to overcome this limitation, many websites keep users logged in by means of a cookie, the sessionId cookie if I am correct. There are 2 questions I am not sure about: ...
I know that SSL encrypts data so that the ISPs can't access it, but we are implicitly letting another source like letsencrypt.org that verifies openssl certificates to be able to decrypt the data. How can this make data transfer safer? I mean I created my own SSL but browsers don't accept it as a valid certificate and ...
Using Tor bridges for censorship circumvention routes your traffic to a bridge before an entry node. If the IP of the bridge is constant, isn't it abnormal that you are always connecting to the same IP and thus allow an ISP to know that you are using Tor through a bridge? Some pluggable transports such as meek-azure ro...
We have a microservice backend system & we expose APIs for our customers to use. We are now developing our Authentication system with our identity provider service. We have a customer(a company), their users using their service via their mobile app. In short, they are a B2C business. This company would like to have the...
If I'm in my private network with my IP 192.168.4.5 and public IP 34.124.x.x, can hackers access my computer only with exploit/vulnerability (no malware) from a different network? The videos, sites and books all have examples with private IPs.
How can malware or a hacker penetrate a firewall in a router/AP or a dedicated firewall without "help from the inside" (running malicious script on a computer, forgotten open ports with port forwarding, configuration mistakes etc.)? Should I be afraid of external devices before my router (like my colleagues in my work,...
I have seen some similar questions a few years old and I am not sure if there are any new changing views on this. I see that this flow is not recommended for mobile native apps. What are the practical downsides security wise of using this flow for this case, assuming the app and auth server are managed by the same orga...
I am currently reading about X.509 certificates from RFC 5280 and there is a thing in section 3.1 that I cannot understand. It says: Users of a public key require confidence that the associated private key is owned by the correct remote subject (person or system) with which an encryption or digital signature mechanism...
I wanted to ask if it's possible to clone your own credit card (clone the emv chip) and copy it onto another emv chip with an emv reader/writer. Shouldn't this be easily possible without extracting any private keys whatsoever? Since I just want to do an identical copy of the encrypted data onto another chip. I don't wa...
Maybe it's not a good idea, but I would like to check it with you. When using HMAC SHA to hash a clear text value (string max 30 char) I need to use a key (256) but in my scenario this key is static and always the same each time I need to hash a value. Also let's consider that this key is safely managed in my App. It g...
The answers to Can a PDF file contain a virus? show that clearly it can! Sometimes we can be quite sure a certain pdf should not need to do anything sophisticated - for example a book in pdf form - so we wouldn't expect them to contain embedded executables, or similarly more complex items, like javascripts, and if they...
My understanding is that secure boot works by verifying each stage in the boot process before proceeding. So first, UEFI or booting firmware will validate the signature of the bootloader, then kernel, applications etc. before loading. When an OTA update occurs, I assume that the signature for the kernel and application...
The most known SSO workflows require the Identity provider to provide the login page/form, for example Google's Authentication for its services. An example for that is the: Simple SAML SSO Workflow But in my case, I have a bunch of apps that each has its own login form. Therefore, having to perform a GET request to fet...
I have recently moved to the manufacturing sector to take care of security of systems/products, specifically operational technology (OT) products. Based on a recent US CISA advisory, I had to apply a patch to multiple units of the same series/product from a particular vendor. The products are used in the assembly line...
For better security(or for better hacker-life-difficulty) i do not trust even on my php files and my question is : <?php //how to deny any reading of .PHP files from standard PHP functions like file_get_contents? echo file_get_contents('../../settings.php'); ?> As you see, the settings.php can contain site-relative ...
If I have HSTS enforced on a web server with HTTPS 443, but HTTP port 80 is still open, does this make HTTP still accessible, or only for the first time before it's added to the browser HSTS list? I imagine best practice would be just to disable listening on HTTP completely.
There are plenty of questions about the difference between AES encryption and hash functions. I read some of them and the general answer is that AES is reversible as long as the key is exposed. AES has fixed input size and hash does not. There is a method to make a hash function based on the block cipher. I am curiou...
I have seen multiple projects committing .npmrc file along with rest of the files. Are the auth credentials npm credentials? What is the risk if an attacker gets hold of the credentials? As npm requires 2 factor auth is the risk low?
I have tried to import this exploit: https://www.exploit-db.com/exploits/50539 and then use it in Metasploit (I'm following a walkthrough), but Metasploit cannot load it. Also I tried to use Python and follow the steps of the script but my netcat is not listening.
I am confused about LFI where I have seen many broken web-app demos demonstrate LFI where they traverse to a directory similar to /etc/passwd. How are these passwords being stored exactly? I do not understand why there is a directory for passwords. Surely a database would be in-use and the passwords would not be lying ...
I recently had to change my password on a linux server (RedHat). It wouldn't let me use my password of choice because it was "too similar" to my previous password. Is this really reasonable? My previous password was 13 characters with an entropy of 85. The new one I entered was 17 characters with an entropy of 111....
I want to use a commercial VPN. It's more reliable when using their own client, since it can automatically select and switch servers etc. But what about the security? On my Android phone, the apps are isolated from each other, so having a VPN client installed (with no privileges granted) shouldn't be a big risk - it ca...
guys, I live in Russia and that pretty much says it all. I was using a standard self-hosted VPN on a DO droplet, but now I'm afraid that since VPN usage in Russia started to spread like a wildfire after the recent Instagram ban the Russian government will surely try to restrict the usage of any kinds of VPN (and they h...
I have imported a personal digital certificate into a Linux Mint computer (OS is up to date, certificate is imported in Firefox and Chrome). I used a password in the process of importing, but after that, no password is needed. Why? I wasn't asked for security level like on Windows. For example - on a Windows computer, ...
What are the best practices to be followed to maintain security in the manufacturing site where camera phones are allowed? I'm working on one of the largest manufacturing facility where few of the R&D/IT/HR team sits in the same shop floor but in one of the designated areas. Though we have restricted the usage of camer...
If we assume that Time based OTP generates the OTP using the hash function like SHA-3. Then, the generated OTP would Hash(Secret, Shared time). We want a shortened string rather than a full hash string, so truncation is needed. But that hash function is not reversible. Attackers cannot predict the next OTP based on the...
I've heard that meterpreter is really good at being stealthy and staying undetected. However, I can't seem to find articles detailing how it stays stealthy. I do know about encoders like "Shikata ga nai" and it's easy to figure that a C2 program would use encrypted channels. What techniques does meterpreter generally u...
My friends Instagram account has repeatedly been hacked. Someone is gaining access to her account, proceeding to change all the security information to lock her out. Then posts scam ads on her account. We have the full phone number and email address the hacker is using to change the info to. The country code has the nu...
I received this notification from Nord randomly. Should I be worried? Is there something I can do? Am I being hacked? P.S. clicked Don't trust EDIT: I tried connecting from mobile data and am receiving a different notification, so the ISP/router is not the problem.
My website has an upload form for avatar, you can either upload image directly from PC or either make website grab it from another host. If the MIME Type is wrong , the response will contain the following: {"status":"wrong_mime","mime":"text\/html;} The application is running on Amazon AWS, and ,from SSRF Attack on AWS...
If I have a self-signed CA certificate in my truststore, and I am sent a chain of certificates where the root CA is missing, is this a problem and if so why? Say that the last certificate in the chain is called S and is signed by CA. If the issuer for S is the same as the subject and issuer for the CA-cert in my trusts...
Per this question in 2012, (Security risks of scanning an unknown QR code) there are a few big risks to scanning a QR code: Scanning a URL that links you to a malicious website Scanning a QR code that performs some automatic configuration (e.g. connecting to wifi, etc.) Scanning a maliciously-formatted code that can e...
Scenario: a user enters his password incorrectly x times, so his account is locked for y minutes. Should I revoke all his refresh tokens? Problems: user is logged out of all devices, not just the one he's on currently (where he entered the wrong password) attacker can log out any user (from all devices) poor UX The a...
I'm building an application that may involve the storage of certain information pertaining to potentially millions users of a popular social media platform for analytics purposes, making the obtaining of consent almost impractical (if not impossible). What can I do to make sure the information I collect cannot (for the...
I opened malicious MS Office xlsb file with OpenOffice by huge mistake. I am wondering does it possess any risk? From what I am aware Excel macros are not compatible with OpenOffice. So I should be fine?
When a user changes password, I'd like to implement a simple check that prevents them from reusing the same password. If the new password matches the old password, reject with an error. Sounds easy, but at the same time I'm aware that hashes can collide. So in theory it's possible for password secret1 and password secr...
In Tor, when a client communicates with an entry node, they exchange the parameters such as the prime number and the generator with each other through DH. What about when an entry node communicating with a middle node, or a middle node communicating with an exit node? Do they (1) still use DH to exchange parameters for...
My crypto token which runs in BSC network has just been stolen few hours ago. I looked at the transaction history in my metamask wallet, nothing new in there. So it must be executed remotely. I do not think the hacker got my secret phrase. I never share it to anyone. The only "sharing" I have done is when I import the ...
I have an application in which some data can be encrypted through AES. Such data can emanate from multiple sources I may not know. For practical reasons I want those sources to be able to encrypt values themselves, without being able to decrypt them later on (only my application would be). I was wondering whether letti...
When one installs Debian 11 with secure-boot enabled, is computer protected against evil maid attacks trying to capture encryption keys using software keylogger? Disk is formatted using defaults which means boot partition is not encrypted. Thanks for helping out!
I recently came across this article: https://blog.sonarsource.com/10-unknown-security-pitfalls-for-python, which describes security pitfalls in the python programming language that are less well known to developers. Do you have examples of other security-sensitive built-in features that exist in Python that many develo...
Before uploading a photo or image to a forum, I may typically strip the metadata to remove identifying material with exiftool. The thing is, the Linux file system itself seems to leave some metadata on a file: cardamom@pluto ~ $ ls -la insgesamt 1156736 drwx------ 145 cardamom cardamom 20480 Mär 16 08:58 . drwxr-...
I'm currently performing a code audit for an application that a company will release to the public as open-source in the next few days. In this application, they use a JWT token for authentication and on the backend, you can clearly see the secret that the JWT is using. This could be dangerous, right? For example, if s...
Let's assume that for my question we're using the equivalent of apt purge, which also removes configuration files. What's left behind after apt purge and similar commands from other package managers? I'm guessing it would be loose dependencies and libraries.
I am using a third party app which stores tokens inside of a mysql db. I need to confirm the tokens but there is no easy way to get the actual values from the DB due to the interface. Long story short, I have the following example of what I see in the DB and what the actual value is. It seems like a hash with salt is w...
I am planning a SaaS-solution, where my clients store and save sensitive data on my servers. Security is a big point as it makes a product more trustworthy, so my thought was that the data which I retrieve from my clients should be encrypted on client side. But what is the best way (at the moment) for a SaaS inside the...
When explaining the concept of signing a message, often it is presented as "encrypting with your private key", so that somebody who has the public key can "decrypt" the signature and verify it. However, PGP signatures (especially detached signatures) allow you to read the plaintext of the message regardless of whether ...
I know very little about Internet Protocol or networking in general but my understanding is that, at a very high level, the routing works by routers telling other routers how "fast" they can reach other destinations. What if there is a malicious (or faulty) router that advertises itself as a fast node but actually slow...
I registered my current web domain (masonbitbyte.dev) with Google Domains and one of the offered features is an email alias / forwarding service. I can create over 100 email addresses on my domain (anything@masonbitbyte.dev) or a wildcard address. What is the practicality of using this service for making an email addre...
on my Ubuntu VPS I am getting a lot of requests and portscans from foreign sources. They are all blocked by UFW. However my question is, if this much "network noise" is normal or is my server being targeted? Here is the UFW log: Mar 17 14:23:26 [UFW BLOCK] IN=eth0 SRC=89.248.163.157 DST=my_server_ip PROTO=TCP SPT=41838...
In a nutshell, I need: to hash a file and to make this hash public, to be able to prove data integrity when sharing the data privately with a trusted third party. to choose the right hashing method to prevent plausible brute force attacks by an attacker who know some important features of the data. I guess it involves...
My mouse dongle was plugged into a laptop infected with a Trojan Virus, is it a possibility for the mouse dongle to be infected?
Hypothetically speaking, if an attacker finds an anonymous FTP login what's the worse they can possibly do other than the obvious impact of gaining access to the files via FTP?
Is it safe to send my ID photo and me holding my ID photo to a site(BitSkins). My intetions were to buy some skins for games, but they asked for verification so can they missuse my identity ?
I have noticed some weird behavior on my smartphone that I can't explain myself. I'm using Orbot application as proxy to route all of the phone's internet traffic through the Tor network. When I search through browser "my ip" websites, results show Tor. On the other hand, when I use other applications, ads in them are ...
I'm having trouble understanding certain security concepts and I was wondering if someone could help me out with some questions. Imagine this setup: A home router with a very strong password, that has a wireless AP (WPA2) also with a strong password. Connected to this router via Ethernet is a device that is hosting a ...
As a neophite in security, I'm very curious to understand if companies can audit computers that their software is being installed on during the installation process, and report back to their servers? Also, would a VPN fail to conceal the computer's IP address when installing such a curious program (if these even exist)...
I have had multiple security researchers tell me that the best practice when a user changes their email in settings is to logout all other devices and force them to login again. Nobody has been able to explain what attack this prevents or how this helps protect users. On password changes: I require re-entry of the pas...
Lets say that: char name[50]="TEST"; printf("%s",name); Here in the code, the %s just says that the variable is a string. But why when we print out user inputs, the %s suddenly change meaning? What's the difference between the user inputting %s and the program printing out %s? Even if the user inputs "%s", the %s stil...
On a company intranet, it is often more comfortable to access an internal webserver just by its hostname (e. g. webserver) instead of providing the FQDN (e. g. webserver.company.com). As long as the hostname itself does not already equal a valid name on the internet, the automatic concatenation of the hostname and a DN...
I have a React/Express application, I want to fully secure it. I'm looking for best practices for these features: data encryption/decryption end-to-end communication access control role management authentication threat detection file protection session expiration control If I missed something please mention it.
In a web application I manage, we have installed an option to let the users to upload files. The files are stored directly in the database. The security department of the company have requested us to limit the files by extension to certain extensions. I've requested them to provide a solution if the file can't be uploa...
We have blocked all direct connections from client computers to the Internet in our firewalls and only allow Internet access via http and https through a Squid proxy. Now one of my users requests permission to use accounting software provided as SaaS via RDP. I am reluctant to allow this because of the possibility of m...
Regarding voice over IP, I'm trying to understand how vulnerable it is to someone intercepting one or both sides of the audio. Logically, it seems like there are 3 "legs" to each transmission. subscriber's phone to provider provider to provider provider to "other" subscriber's phone It seems VOIP providers can offer ...
What firmware components of a PC are writable? For instance which components have the ability to store rootkits or viruses?
I was troubled from the very beginning by the fact that my U2F security fob acts as a keyboard and theoretically is able to press any key when no one is looking. Sometimes I accidentally touch it and then screen goes mad because of all those keystrokes. It seems to me a pretty bad design choice. I was reading article b...
I am new to SSL certificates and trying to wrap my head around this concept. As per my understanding when a valid certificate is signed (by one of the many official CAs) it can also sign a certificate that is part of the same SSL trust chain - after all every certificate has a public-private key pair. Lets consider the...
In BLE there is events like authentication, pairing, bonding, exchange of LTK to secure a link, etc... How does HMAC fit in BLE? I know that HMAC is used to ensure the integrity of a message so does that mean that even after exchanging LTK and securing the link, it is still necessary to use HMAC to ensure the message i...
When trying to access a Cisco VM router in a GNS3 environment I'm getting the error: SSH protocol v.1 is no longer supported when I'm using the command sshpass -p Cisco ssh Cisco@192.168.224.7 -1. I think I can edit /etc/ssh/ssh_config to allow this but unsure of the option to do so. Is there either way to force ssh ve...
Let's say there is a system that can set IP ACL for security. If administrator can't bypass IP ACL, account may by locked up when machine or network IP changed But if administrator can bypass IP ACL, then an attacker can bypass IP ACL when got administrator account. IP ACL gets meaningless. Is there good way to mitigat...
How insecure are self-signed certificates? Why does Tor still use them?
I have no access to the router nor do I have any administrative access to this local network. But every 5 minutes the router attempts to connect to my PC through port 80/tcp, and it attempts exactly 4 times each time (and tries again 5 minutes later). I found this out from my firewall log, blocked incoming connections ...
I work for a big insurance company, they have created a certification authority to generate certificates for their internal webservices. These webservices are accessible from their intranet only and are called by their applications and services only. Does this situation make sense? They certify to themselves that they ...
When a Windows .exe installer is code-signed, I thought that modifying a single byte (thus changing its SHA256 hash) would make the digital signature invalid, but surprisingly, this is not true. Indeed, as reported two days ago in Each Firefox download has a unique identifier, a few bytes differ in each download, with ...
I need to allow a user to pass unsafe text into an iframe URL: <iframe src="https://example.com?foo=INPUT"></iframe> Inside the iFrame render code, I have this: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title></title> </head> <body> <script> window.myVar = '<%= cleaned %>'; </script> ...
In BurpSuite, you can brute force a password of any length and any character set (in my case, alphanumeric passwords between 1 to 7 characters long). How does one do it in OWASP ZAP, without actually generating a password list containing alphanumeric passwords between 1 to 7 characters long?
So I'm a complete novice in security practices, and an amateur web developer. I have a personal website connected to a personal DB. Currently there is nothing in this DB that would be useful to anyone but me, and I wouldn't care if any of it was stolen. I've had a probably stupid idea, and I'd like some help evaluating...
I just clicked a phishing link and foolishly entered my credit card details. I realized it was phishing before I hit SUBMIT. Is there a chance I exposed my data?
Just got an email that mentioned, in very broken english, having hacked my email etc. and actually managed to list my current password of that email account. The mail was, apparently, send by that very email and is, only in outlook, dated to be from march of 2030. I have searched a bit and im fairly certain that the em...
I want to use a multi-domain SAN certificate for 5 of my public-facing domains. All of these domains point to the same ingress server (SSL is terminated at the load balancer), but the backend processing for each may be different. Is SAN is a good choice or should I go with a single domain certificate for each of the do...
given a collection of files (text and binary) that are likely to have been modified by a resourceful and motivated adversary in a targeted attack, is there a security risk to copying that collection of files to a trusted linux machine ? if there is a risk, can it be mitigated by changing settings ? this is currently ru...
I have read about ASLR and understand that it randomizes the location in memory where an executable is loaded every time it is run. But I have a doubt, take an example of an elf executable. It tells where the program should be loaded in virtual memory, at what virtual memory address it should be loaded. Let us take fo...
When I am testing mutual TLS handshake performance on TLS1.3 using OpenSSL, I find a very wired thing: I created two groups of servers and clients: Server1 has a certificate signed using RSA3072, and Client1 has a certificate signed using ECDSAP256 Server1 has a certificate signed using ECDSAP256, and Client1 has a ce...
I saw a news report about now freely available software to make "deepfake" videos. Couldn't videos be internally marked using a private key, so that everyone could verify the originator using a public key? This could be built in to browsers so that everyone could see if something was fake or not. Is it technically poss...
I am currently working on a medium scale app and am a month into learning React. I got to the part where I need to authenticate users. I have written some code and It is working, but I don't know is it secure enough. When my users login, they are assigned with a JWT token like this: await axios.post(APIbase + '/login'...
When storing a JWT for authentication in a web application, my first instinct would be to store it as a "hardened cookie", meaning all the required flags such as "HttpOnly" and "Secure" being set. This would still allow me to make use of XHR, as XHR requests to my own domain with .withCredentials(true) would still incl...
I can see that with openssl list-cipher-algorithms I can get a long list of ciphers that can be used to encrypt data. However, I know that not all methods are equally secure and some may even be outdated. E.g. ECB may reveal patterns in data and DES is considered legacy. My question is, where can I find which of these ...
This news article (cited in this other question) shows that the company UberMedia (now rebranded Near) can retrieve the location of people's home from persons attending an event. How does this company manage to get this information?
I've been working on a buffer overflow on a 64 bit Linux machine for the past few days. The code I'm attacking takes in a file. This original homework ran on a 32-bit system, so a lot is differing. I thought I'd run with it and try to learn something new along the way. I set sudo sysctl -w kernel.randomize_va_space=0 a...
I was thinking of a OTP algorithm that signs a randomly generated password. There are two things at play here: The MFA portal Knows the public key of the user's MFA app The user's MFA app Has a private key stored Here is a login flow: The user logs in and is directed to the MFA portal The MFA portal generate...
Somestimes I press on my yubikey accidentally and it writes the token on the screen and even sends automatically to the person I'm talking to on some chat, because it presses enter. This happened several times to me, it weites something like xcvcvc....457 and sends. My yubikey is, as far as I know, a 2FA on LastPass, s...
Recently I was testing whether I could make 7-Zip archives more bruteforce-resistant. Both someone on Wikipedia and @kelalaka on this website make the following claim: The 7z format supports encryption with the AES algorithm with a 256-bit key. The key is generated from a user-supplied passphrase using an algorithm ba...
Can this be safely ignored? VirusTotal shows that Microsoft is the only security vendor that flagged this file as malicious. I did not modify my Surfshark installation in any way, except for an update last week. Translation of the screenshot: Misleading:Win32/Lodi Warning level: Low Status: Active Date: 03/22/2022 00...
I am adding Single Sign-On (SSO) via Google and Microsoft identity providers to a web application where many thousands of user accounts already have existing credentials stored by username and password. Each account also has a primary email address separate from its username. Users can reset their passwords by requesti...
My infosec officer is campaigning the use of client process-based authentication everywhere applicable for future and existing projects. For existing projects, especially for custom applications, this entails non-zero cost, not to mention potential service interruptions down the road. Therefor I need to understand as m...
Diagram: Server -> Exit Node -> Middle Node -> Entry Node -> Client In Entry Node -> Client, how does the entry node authenticate that the receiver is a real client but not a MITM?
Taking into account a Root of Trust in a device using a TPM. My understanding is that the bootloader, firmware, operating system, applications etc. are all verified on startup by validating signatures with the vendors public key. The TPM Endorsement Key is unique to a particular TPM. What role does this play if any in ...
I would like to store my DB password in Java .property file and encrypt it using Jasypt. But from what I see, it just moves the problem from hiding the DB Password to hiding the encryption password. I thought of using environment variable to store the encryption password, but it requires effort by the dev to change/set...
Recently our server logs have been showing lots of requests to urls like the following: https://*.example.com/doh/family-filter and https://*.example.com/doh?dns=DUIBAAABAAAAA... (with our domain instead of example.com) I noticed that some of the paths, e.g.doh/family-filter, match those of CleanBrowsing DNS filters. H...