instruction
stringlengths
24
29.9k
As part of SOC 2 preparation (and just general operational best-practice) we take regular PostgreSQL backups and keep them for up to a year. One of our partners has a requirement that we be able to delete any data sourced from them on request, including from backups. The GDPR right to be forgotten would seem to imply a...
I am following the following walk-through for a box called Sheild on Hack the Box (HTB). https://www.aldeid.com/wiki/HackTheBox-StartingPoint-Shield For privilege escalation, the walkthrough says "Running the sysinfo command on the meterpreter session, we notice that this is a Windows Server 2016 OS, which is vulnerabl...
OAuth manual advises that the client ID should not be easily guessable to decrease phishing attacks. https://www.oauth.com/oauth2-servers/client-registration/client-id-secret/ Is it still the case when PKCE is used and auth server redirects only to allowed urls? In what cases I might need to change client id for existi...
I have found an XSS bug in a chat form on a bug bounty target. When I enter in the chat form input <button onclick="alert(1)">click</button> and after that I click the button a popup alert appears. I`ve sent the bug but they said: Thank you for your submission. However, based on the current circumstances this finding ...
I have a system with three layers: two client web apps, one Backend, and two DBs. The two DB and client app instances represent prod and test environments. The backend has only one instance that should serve both environments. Say I have prod-client.myapp.com, test-client.myapp.com, prod-db.myapp.com, and test-db.myapp...
Password length/complexity only mitigates a brute force attack, correct? In the event of a hash leak, since any algorithm is a fixed length, there could potentially be a pre-image* with a very short / not complex string? Salting notwithstanding.
For the past few weeks, I am observing a lots of visits from a specific user-agent - Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36 to one particular URL. The user-agent corresponds to chrome 84 on windows 10 desktop. This browser is an old browser an...
If TLS communication uses ciphers that does not support forward secrecy[FS] (like RSA key exchange ciphers), confidentiality of the past communication is compromised if the private key is compromised. But will the integrity also gets compromised in this scenario? I got this doubt after seeing the CVSS scoring in this l...
Many websites have different requirements for a strong password (beyond simple length I mean). Anecdotally, I think these requirements are common: Password must contain a mix of upper and lower case letters Password must contain at least one number Password must contain a special character like ()*&^%$£"- etc. Passwor...
I am having trouble finding information on the implications of using https: and data: as a source for the directives in a CSP. Example: img-src 'self' https: data:; Could someone some context around what these two sources mean and if there are security issues with using them like this?
I'm looking at creating a healthcheck dashboard that at a glance shows you information about all our services including: Are they running What sem version they are running The most recent commit hash of the code they are running. What I was thinking is that the /healthcheck endpoint would return this information. Is ...
Let's say I setup openVPN at home, then I go out. I connect my ios with openVPN server at home, then I download Netflix app. then I turn off location and any necessary tracking feature on ios. I login with my Netflix account on ios app. the question is, Can any app know its users using VPN technically? (I think we ca...
Lately I'm confused about threat hunting vs SIEM Use case creation. The threat hunting resources I have read can be created as a SIEM use case. Then why should I perform it manually in the name of hunting? How exactly does hunting differ from SIEM use case?
I was recently using my personal google account on my work computer and some of my previous google searches appeared from my personal phone. I used Safari on my personal iPhone and I guess google. So can work see that search history on my personal phone? Maybe my google account was synced but I can’t access gmail on my...
I know that once a password is on a server it is hashed and salted. But when it was transferred over the internet it was stored in plain text, right? And also when it is in the memory of the server before it's been hashed.
Recent ransomware events often include data theft in addition to just encrypting data. The Encrypting File System on Windows Pro/Enterprise editions encrypts individual files using a private key stored alongside certificates for that user account. The file is therefore unreadable by anyone except the logged-in user acc...
First of all, is my understanding correct that primary keys and subkeys are all key pairs consisting of a private and a public key? I get the rationale behind using primary keys and subkeys1, and why one should keep the private primary key (or master key) "very, very safe", but not sure what the consensus is on handlin...
I was reading this article about MD5 hash collisions in which it clearly states that these two strings (differences marked with ^): d131dd02c5e6eec4693d9a0698aff95c2fcab58712467eab4004583eb8fb7f8955ad340609f4b30283e488832571415a085125e8f7cdc99fd91dbdf280373c5bd8823e3156348f5bae6dacd436c919c6dd53e2b487da03fd02396306d248...
tldr How can I define a SELinux policy, that limits filesystem access of portable Tor Browser to its installation directory, say /home/user/.local/opt/tor-browser_en-US? How might Tor Browser be hardened even further (X11 Window system, Tor process) - in this sense what about sandbox/policycoreutils-sandbox? Threat mod...
In a program i am writing, i use session authentication tokens that we give back to a user to have them hand in with their requests. This is working very well but this question is about the generated token and chance of collision. Here is the PHP code used to generate a token: bin2hex(random_bytes(32)). I have been con...
I am using x-frame-options sameorigin header to prevent some of my websites from being loaded in iframes. Is this a foolproof method to prevent iframe loading? There have been several old threads on stackoverflow that discuss employing frame busing javascript code. One example being: if(top.location!=location) top.loca...
I've been playing around with the EternalBlue exploit recently. I've downloaded a Windows 10 iso file from 2016 and used it to set up a Windows 10 Pro VM as my sandbox. I also ran the nmap script and metasploit scanner module to ensure that it is indeed vulnerable to ms17-010. However, when I run the exploit module, I...
How do you manually validate vulnerabilities from a vulnerability scan or a vulnerability release from a vendor? Say you received a report with a high vulnerability. The vulnerability scanner used a version check of the header. If there are no public exploits for this vulnerability, how would you check it if you do not...
If I ever suspect a security incident exceeding internal capacity & skill sets, my plan calls for outside professionals. In choosing a specific Company, I expect to expose the company to these risks: Company does not have someone available for us right when we need them Company sends someone lacking experience & compe...
I've just seen a "high-risk security alert" for the presence of /etc/passwd- (note the trailing '-') on RHEL 8 servers, and don't understand the issue. Apparently the issue originates with the CIS benchmarks. My understanding is that it's a backup of the passwd file created by utilities like adduser; what I don't under...
Conceptually, "THIS EMAIL IS FROM AN EXTERNAL SENDER" warnings should be useful at preventing phishing or spoofing attacks. If "your boss" asks you to buy a bunch of gift cards and you see that warning, maybe you catch it. With so many legitimate external emails received, I'd imagine users may get a sort of banner bli...
Recently, I've checked the some articles including R. E. Smith, The Strong Password Dilemma. ch. 6., Password Strength: An Empirical Analysis, Distance between two passwords and Password strength metrics. The mentioned strong password policies are: Each password you choose must be new and different. Passwords must be...
Is there a scheme that let people derive public/private key pair from arbitrary secrets? As you may know, digital signature schemes have versatile use cases. The problem is, the key pair handling is too difficult for end-users. On the other hand, the concept of password is pretty much ubiquitous; people can handle it w...
How secure it is (not) to store a JWT token (for instance) in Android's AccountManager? I know a good alternative would be to use the android KeyStore, specially with the new Jetpack Security libs, but I'd like some folks input about the risks of doing the other way. Ref: Android AccountManager
I am struggling to appreciate the differences between the 7 steps of the NIST Framework for Improving Critical Infrastructure, which should help an organisation implement it. Step 1: Prioritize and Scope. The organization identifies its business/mission objectives and high-level organizational priorities. With this in...
I'm a newbie in this field so forgive me in advance if this question is stupid in anyway. Say we have a software that is executing on our system and encrypting files using a secret key that is not known to us. Is it possible to somehow gain access to the keys by say accessing what the CPU is executing or through some o...
I'm trying to build a base image that pulls from php:7.3-fpm, which is built on debian:buster-slim. The php:7.3-fpm base image has vulnerabilities out of the box, like https://security-tracker.debian.org/tracker/CVE-2019-3844 and https://security-tracker.debian.org/tracker/CVE-2019-19603. From the look of it, there are...
I was not able to find a definite answer to the question whether it is safe to disable spectre and meltdown vulnerabilities but i could articles that suggests the defaults might be revisited & windows seems to allow the disabling of these. Does anyone know if it has been established clearly, the type of servers which a...
I want to implement a service that can't read the data you store there. The Idea is that I, like in a password manager, use the password to derive a vault key, which is different from the authentication key, that is used to encrypt/decrypt the data. How can I encrypt and store data from multiple devices while only shar...
Suppose there is a file hosting server, and most filenames are strings with mostly CJK characters. Transmitting those characters in HTTP GET requests requires encoding them using UTF-8 (x3 overhead) then URL-encode escaping (another x3 overhead, x9 in total). These filenames may be processed by front-end and back-end t...
The New Android 12 provided increased privacy to users accessing the application by not providing an IMEI. But an alternative that can be used by an app developer is to uniquely identify a device that has enrolled in a work profile. https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setOrgani...
I ask because I've been looking into Miniconda (https://repo.anaconda.com/miniconda/Miniconda3-py39_4.9.2-Linux-x86_64.sh), and the installation shell script has TONS of binary data starting at line 577. I ended up checking the shell script because Google Chrome flagged it as potential harmful. I know, it's just Google...
Suppose a Veracrypt container was mounted and dismounted later. Then CCleaner was run, Youtube was used to watch videos, websites are browsed, and so on for 3 hours. Then computer went to sleep (hibernate and pagefile disabled). What are the chances that the container can be decrypted because of whatever is left (maste...
What I found so far is that Application requests TA service using qseecom kernel driver. Monitor route that request and TA handles the request in Secure world and return the result.(generated private key). The application get the result(something like generated private key). But if the host OS(linux) was compromised,...
Our router (Asus RT-AC68U) has been slowing down our speeds, up until I disabled the IPV6 firewall (Went from 250 to 380, which is the modem cap for now). We've always had IPV6 disabled on the router, but I was wondering if it poses any security risk by also disabling the IPV6 firewall.
Imagine a user has an ip of 1.2.3.4 The server the user intends to connect to has an ip of 2.3.4.5 An attacker has a machine with a promiscuous network card on the user's local network. The attacker also has a server on a seperate network with ip 3.4.5.6 The user sends a request to 2.3.4.5, which the attacker had DDOS'...
I am very new to SAML and currently doing research on whether SAML is the right solution for me. All the SAML examples that I can find work on the email domain. I wonder if it is possible to build a service provider and identity provider based on a phone number. For example, if I go to https://www.atlassian.com/ login...
Let's say I have a binary string s, that is generated by a cryptographically secure random byte generator, and a hash function SHA-256. I am using the hash h=sha256(s) as a one-time password verifier and send it to the server, how many bits of security does this provide? I guess the question is how easy it is to find a...
For PII, we capture mostly emails, mobile and name of users who signup on our website. Along with this purchases made by users are also a sensitive data. Protecting this data for users privacy is as important as not letting any disgruntled employee from selling this data to our competitors. This data is stored in MySQL...
I have read that storing the jwt token within the httponly secure cookie is the recommended way to prevent both csrf attacks and xss attacks. When a user goes to my website they may make an api call like so POST mygatewayproxy.example/login-service/login and the request is proxy to the loadbalancer POST my-login-servi...
I know that the concept of TOTP is for when the device on which the code is to be verified is separate from the device that is going to generate the code. However, I was wondering if it is a bad idea to use the TOTP algorithm for generating the verification codes used in email/phone_number verification (where the code ...
When it comes to infections with viruses, in almost all cases the initial infection requires some sort of user interaction - apart from those cases where a plug-in has some sort of security flaw which gets abused. While the why is clear - you simply don't want your browser to execute random binaries it found on the web...
Regarding backups (escrows) of GPG (OpenPGP compliant) keys, I seem to understand that (E)ncryption keys need to be backed up, to prevent data loss, and that (S)igning keys should not be backed up, because it is crucial that the owner is absolutely certain that they are the only one who can use the signing key at any m...
Reset token contains lower case a-z, 0-9 number, there will be at maximum 5 number, at minimum there will be 0 number. It is randomly generated. How many possiblities do we have? How much time does this take to brute force? Example: x8h1w751, j6p0u32t, 7a5yh8x1,kbyjawkm,zny5clm.
A new trend in account security is spreading: web services like LinkedIn reset passwords automatically when detect attempts of getting access with wrong password or from new locations. Thus, a user has to restore password every time when not using 2-Factor Authentication. The problem is that most support services ignor...
I have heard about this, but not sure how it would work. I would imagine that when you register the device, the public RSA key burnt into the chip would be shared. That way, if the application sends a challenge, the TPM uses the private key to decrypt a message and send the correct response?? I'm just guessing so any c...
The problem with static software whitelisting is that in the real world, employees with versatile jobs need to run unexpected programs. Company sets up a whitelist to limit what programs can run - cool, security! But next thing you know someone needs to run something to do some time-sensitive task, they can't, delivera...
An Overview of XMPP Luke Smith recommends XMPP As Luke Smith said in his video, XMPP has been designed as an open communication protocol, which is similar to the email at an extent, I am wondering why people consider it as a safe communication method. So far as I know, the XMPP protocol itself doesn't provide any enc...
I would like to know if macOS "Big Sur" sends unencrypted OCSP requests. I am a newbie and not aware of technical stuff, but when I came across Jeffrey Paul's article, I am a bit concerned about whether to continue using Mac.
The W3C spec for Content-Security-Policy or Mozilla CSP docs would be the definitive source for this answer, but it does not seem covered, so I'm asking here for answers based on people's experience. If my understanding is correct, then I'll probably contact the W3C spec authors. My understanding is that browsers have...
Can a “bad guy” spy on an android phone without installing spy apps (those apps that require payment)? By “spying”, I mean using key logger, screenshots, read messages and so on. Is it possible to spy on an android without using such spy apps? Is there another way someone can spy on you? Does “unknown sources” have to ...
I'm not sure about my system so I want to completely wipe my HDD and reinstall Windows 10. But I realized that an infected system can also infect a USB bootable drive. Unfortunately, I don't have access to a trusted system to create the USB bootable drive. I scanned my system with a couple of antivirus software (Malwar...
Could a video file contain code that reveals and sends your ip/mac address or give access to personal files to somebody else? Would normal video players (like VLC) be able to notice that kind of security issue and not run that specific part? Thanks EDIT: I'd like to be more specific. I downloaded a tutorial video from ...
I am trying to implement RBAC to a system but I endup creating an ACL instead due to my low understanding of this archtecture. What I already have implemented: Created User model. Created Groups with different permissions from User model. Designated each user to each group based on their permissions. For instance, th...
My question is essentially the same as this one: How to force GPG to use a Keycard when it is available which asks how to force GPG to use a keycard when one is available. That question was asked in 2018 however (3 years ago) with less details, and no answer was given. Also see Create backup Yubikey with identical PGP ...
I want to create a threat model to guide a security-oriented review on a project. I found the OWASP Threat Dragon and would like to do it in that, but from the documentation and example I am unsure how to use the elements provided. The diagrams can contain following elements: Actors (represented with boxes) Processes ...
Example: Bob uploads a file to my custom file server locked with a password, which then the file server generates a link for him to share Bob wants to be able to share this data to anyone that has this link Bob doesn't want anyone but the people that have the link and password to access his data, not even the server...
I'm working with Tomcat and nginx as a reverse proxy and I'm trying to have a better understanding of how the traffic flows and of what the security issues are. Picture this as what I have in mind: Tomcat and a webapp are installed on server X, with ports 8080 (unsecure) and 8443 (secure) open. On another server whic...
I recently saw this article of a version of Mirai being spread to Android based devices via ADB enabled. My question relates to how Mirai does scanning. Lets assume I have a Android based device (like tablet or smart TV) in my home behind a router. If a Mirai bot sends a TCP SYN to some port (like 5555 for ADB) to my r...
I'm still not completely sure about the role of using an HSM or TPM on a device when it comes to storing private keys for security purposes. My use case would be using TLS with an embedded device which contains a unique self-signed device certificate signed by a root CA private key. The device authenticates itself on A...
A piece of malware detects signatures of the sandbox an AV solution tries to use to fingerprint malicious behavior and pretends to be innocent. Once in the real OS environment, it then downloads executable data encoded as image data and decodes the executable bytes from the image, storing them in memory out of order, p...
All users in my google domain use 2fa on google accounts. We have on-premise software (gitlab for example) that allows us use google accounts to login. Also, gitlab has a feature of 2fa. Should we use it? Does it add something to security or not?
A few hours ago, I spotted my unattended mouse moving and seeming to click on tabs. I promptly rebooted my system and removed Teamviewer (it's the only remote connection app that I have installed), Remmina, expressvpn, and a whole bunch of other apps that I no longer use. Is there anywhere or a way that I can check for...
So i clicked on a link to play a game with someone but it turns out the link was an ip grabber i think. The hacker now knows what country i live in and the password to the game account. I don't know what else he knows. I have already tried unplugging my router because I was told that my IP address would change. can som...
I have a few terminals that I currently use a static IP to authenticate. The problem is in my country the internet is not stable, so often I have to switch to mobile data, then the terminals can't authenticate because their IP addresses changes. The solution I have thought of is using the MAC address of a terminal as a...
Is there any major flaw in using TOTP in a way where the server sends its time to the client when the client requests to log in? The advantage of this is the client's time does not have to be set correctly, as it uses the time provided by the server. The disadvantage is the client must be online to generate the passwor...
I know that ESNI and certificate encrytion in Server Hello are aimed at preventing eavesdropping from the hostname and ESNI hasn't been taken into practice for common web servers yet. Even though, I am still curious about: How does tls 1.3 encrypt certificate in Server Hello to prevent eavesdropping? And how does the c...
On a website with user accounts, all HTTP requests coming from the submission of a login form kind of contain the same info, there are only a few things that are different in the HTTP requests, such as the entered username, the entered password, and a few headers, such as User-Agent. If HTTPS is used to encrypt the req...
I have received a public key that does not appear to have the encryption capability enabled: > gpg --list-keys ...
If a website emails a password in cleartext when you use the "forgot password" function, is there any possibility that the password is hashed? It does generate a different password if you reset it again, but it always gets emailed in cleartext. Is it possible to reset a user's password, proceed to email it in cleartext...
On a few rare instances, I've received an email from a website notifying me that my email and password were found in batch of harvested logins, and they then force me to change my password. This has only happened on a few very old unused accounts that date back to when I was foolish enough to use the same password on m...
Background: We got a few new model SIP phones. Each phone has built-in unique certificate issued by the manufacturer. Previous models had certs issued by a different CA and that CA cert was published, so I could verify the phone's identity as it gets provisioned starting from the factory default state. Manufacturer's s...
I have a database-backed web application, with authentication via organizational single sign-on, modeling a library lending system for digital books. I'd like to allow users to check out books and see what they've checked out, without allowing myself or other administrators to keep track of who's checked out what. I al...
I want to implement Chip Authentication for ePassport documents, and wish to validate my understanding of it. I've managed to get it up and running by using the JMRTD library, specifically the function doEACCA(). When inspecting the code of this and associated functions, I observed that it doesn't actually verify the o...
In the past few days, I have created my own webserver to serve as my sandbox for learning pen-testing. I saw this blog (https://outpost24.com/blog/from-local-file-inclusion-to-remote-code-execution-part-1) and wanted to attempt something similar and build it on my webserver. This is what I have done so far: My index.ph...
If a string has a length of 16 characters, but it is also known that the first 2 characters are fixed, and that the rest of the string has random letters but letters only, no digits nor special chars, would it still take years to crack a sha256 on these conditions or is it unsafe?
I've found this PHP library for detecting/guessing the language of a given string: https://github.com/patrickschur/language-detection I would have massive use of this. I would really like to use it. But I cannot. All I can think is this: What if, tomorrow, that developer is either compromised or goes rogue and updates...
Imagine your iPhone gets stolen or seized. Inside this iPhone is your SIM-Card. That SIM-Card is your only SIM-Card and it is enlisted as "trusted phone number" in your Apple Account. The iPhone is the only Apple product you own. (Note: I believe this setup is not "special" at all, but rather common.) The attacker now ...
I am trying to determine best practices for implementing a webapp running in an extremely tight PKI environment. Assume: Yubikey like devices that have Certs with reasonable expiration dates The organization has proper certificate revocation mechanisms Certs provide username and access-role information Browsers implem...
I'm trying to understand what is good/bad about hashing a password on a database (like postgres) as opposed to hashing it on an api server and then sending it hashed to the db. Can anyone speak on this and the pros and cons of the security risk(s) of either implementation?
Secenario Consider the case of a MacBook Pro with FileVault active. The computer is on and I'm properly logged on. I frequently need to access sensitive data located in text files on an encrypted volume. The encrypted volume is created when I mount a particular file that lives on the main hard disk. The encryption prog...
I've been reading a bit into car security and all of the ways cars can be stolen through various alterations of replay attacks. Upon researching whether any of the more modern cars are using anything more secure than "new code after usage", I haven't really found anything satisfying. Which makes me question, why don't ...
I have a domain for a website that I'm going to deploy soon. I've registered a gmail account, and let's say it is myWebsite@gmail.com. In order to look more professional, I decided to use gmail's "Send email as:" feature, and now I'm able to send emails as contact@myWebsite.com. What I was very surprised to learn that...
I have researched and understood that Cache-Control: no-cache is not sufficient alone to absolutely prevent caching, but what about Cache-Control: no-store alone? Since it will not allow storing of cache anywhere, this seems to be enough for preventing caching, is that right? Or is there any catch to that as well?
I am currently thinking about alternative ways for my native iOS Application (written in Swift) to receive access- & refresh-tokens. As of now, user sessions are established using revokable JWTs, issued by my API once a POST request is made to the /login endpoint, containing email and password (and optionally an MFA to...
According to Wikipedia, The primary scope of TPM is to assure the integrity of a platform. In this context, "integrity" means "behave as intended", and a "platform" is any computer device regardless of its operating system. It is to ensure that the boot process starts from a trusted combination of hardware and softwar...
I'm currently working for SaaS a company and as part of a security audit we were advised to remove all administrative access from all laptops/end-user pc's for a Principle of Least Permissions. Is there any MDM/management software for Ubuntu that would allow us to remove root-access to ensure we're less vulnerable to m...
Go and Java have "compile time constants", and JavaScript will soon get a feature that allows "Distinguishing strings from a trusted developer from strings that may be attacker controlled" via isTemplateObject. These allow the program to check if a variable contains a string that came from the source code (i.e. a liter...
I have a Windows service that accesses a database connection. Since users rarely use Windows authentication, I encrypt the connection string. For development I have the password hard-coded, but I know this is a very bad idea. What is the proper way to store a non-user entered password? As a side note, I tried storing t...
I recently downloaded 2 compressed files (.zip and .rar) from a really unreliable and untrusted source while using a browser integrated VPN. My antivirus didn't notice anything but I am curious if it is possible for a compressed file to contain malicious code that could potentially reveal my real IP address by communic...
If one made software, but later needed others to work on the project, how to secure the software files and source code if one of the developers tried to share the source code with others or if someone split from the team and tried to do something with their knowledge of the source code (like trying to hack the software...
I have been learning Cyber and Information Security for a while now, from different sources and courses. While there is a lot of theory, no high-level math seems to appear anywhere, apart from basic algebra and the "programming math" (graph theory <not much of it, bit manipulation, binary operations, optimization, game...
Almost a year ago, I dual-booted Windows 10 and Linux Mint. And since then, I haven't booted into my Windows 10 OS. I still remember that the Wi-Fi adapter was off when I shut my Windows 10 down. Now, since my Windows 10 OS is not up to date with the latest security updates, is it vulnerable to malware even though it i...
In reference to another post about the Respondus Lockdown Browser, I was wondering how can a program edit and remove parts of the "Secure Desktop" Ctrl+Alt+Del menu in Windows, as well as disable the power button at the bottom right? Is this safe? This is what happens when trying to Ctrl+Alt+Del with Respondus Lockdown...
This would be used in a phishing attack for example - coffee shop attack where google.com becomes a website controlled by the attacker completed with the magic lock next to the URL. Can I use letsencrypt to create a valid cert for any website that browsers will trust?