instruction
stringlengths
24
29.9k
When using postMessage it's important to define a targetOrigin to ensure we don't leak data to other sites. It's equally important to check the origin when receiving a message to prevent other sites from triggering our scripts. But, if we're just expecting to do this on our own domain, is there anything wrong with: tar...
I got just this typical spam email, but this one seemed odd. It came from Google Forms, which apparently can send emails too, however you have to sign in to Google Forms to use it, and it uses the email you signed in with. How did this spammer manage to appear to send from the Forms email? This seems like it can be eas...
I have two SSDs in my laptop. one is SATA 500GB and the other is M.2 SATA 250 GB. I used the following steps for both to securly erase them so that I can sell the laptop: unfreeze the drives: sudo systemctl suspend Set a User Password: hdparm --user-master u --security-set-pass mypass /dev/sdx Issue the ATA Secure Er...
Forenote: I'm not familiar with how virtualisation works on a low-level (but I'd certainly like to learn) so this question could arise from ignorance. Example Scenario: One virtualised router is connected to a networked device. Appropriate firewall rules are in place (on the virtualised router) to ensure the device can...
The Tech Solidarity organization provides a list of basic security guidelines, described by Jeff Atwood as ... pure gold and has been vetted by many industry professionals ... From that same organization, there is also a list of Security Guidelines for Congressional Campaigns (april 2019). Here are a few quotes from ...
I run LEMP stack on Ubuntu 18.04. I need to sign / verify transactions for Ethereum real-time. Where can I store the private key for it? Is storing it in .env good enough? It just seems super dangerous but I can't think of a way of me losing that key. But I am not a security specialist, so want to make sure and use the...
Recently, I have found out about Microsoft Cybersecurity Reference Architecture. It shows how Microsoft products can fit into an existing company's network and policy setup, however it is quite generic. I am looking for something similar to that, but just an example, reference network diagram from a known tech company ...
If all the applications, virtual machines and services we use at our company are hosted in different clouds and assuming all these services are accessed through encrypted layers (https/TLS/ssl ...). Does getting a VPN so every employees trafic goes through our companies internet connexion (even if he's not physically i...
Can File Shredder be used to purge specifically Temporary Internet Files rather than the whole disk? Is there any option to just shred the Temporary Internet Files, and nothing else? Is this a good way to make cache unrecoverable (read: harder to recover)?
I am planning to encrypt database fields using AES encryption. Now, this encrypted data will not transfer over the internet and will reside in our own datacenter only. From what I read, GCM mode should be the obvious choice for encryption since it's more secure(basically it's authentication encryption) and it's fast. B...
So I read this question about deniable encryption but it left me with a few questions. The first answer describes how you could hide one file system on a drive. The process goes like this: Fill the drive with random data Select a random offset and create the encrypted file system there so it's indistinguishable from t...
Let's say I have a site like stack overflow. People post comments with - possibly - links to external sites. Is there some "standard" set of rules to make it reasonably safe for users and website? I have noticed the following features on other websites: All links have nofollow attribute, that helps to reduce site pena...
I was working with a freelancer from upwork and noticed they added this script titled .default in my config directory. It looks malicious and they were hired to do CSS style changes of elementor: <?php header('Cache-Control: private, max-age=0, no-cache'); if (!function_exists('getUserIP')) { function getUserI...
We know that Intel processors have one (ME) so it is definitely possible. In general, how could you even trust a piece of hardware like a CPU or network card, even if the manufacturer says there is no backdoor? For software, it is easy since you can access the source code verify it and compile it. But for hardware?
I just got an email from the Unsplash service telling me that someone had logged into my account via credential sniffing: Five minutes later I get three more emails, each one notifying that a (generic) photo just uploaded to the account had been flagged. The news doesn't surprise me because the password is a weak thro...
I am evaluating a vendor whose technology takes the following approach: My website asks user to install vendor's executable (EXE) on their machine. This EXE does operations that cannot be done in-browser EXE also starts a local web server on client's machine My website connects to 'exe.vendor-website.com'. This is a p...
Recently i wanted to play a bit with TCP/UDP networking (and touch some custom HTTP server impl) on C# and found out that i'm getting requests from totally unknown dudes, such as this one: FROM: [::ffff:149.129.139.48]:52306 [ANS] POST /cgi-bin/ViewLog.asp HTTP/1.1 Host: 127.0.0.1 Connection: keep-alive Accept-En...
Our application stored **e.printstacktrace()** in a log file, which is accessible to a specific user group. We need such detailed information for debugging purposes. As per the security team, they are requesting us to remove such detailed system information from the log file, so here my question is about how it will af...
I have reason to believe that there is a persistent backdoor on my device, one which is not removed after a re installation of the OS. I wanted to know the step by step protocol of system wipe to remove any potential back doors. It's possible that the installation media -- live USB is re-infecting my machine when I boo...
If I compile a code with gets, the compiler outputs a warning saying that the function shouldn't be used: <source>:5:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations] gets(buf); ^ In file included from <source>:1:0: /usr/include/stdio.h:577:14: note: declared here extern char...
Let's say I'm doing a pentest on BlueCorp and find a bug in the software UnrealSec made and distributed by SecCorp which is used by BlueCorp and found during said pentest. Should I report this bug to both BlueCorp and SecCorp or only one?
I recently was studying x86 buffer overflows + ret2libc attacks from https://www.ret2rop.com/2018/08/return-to-libc.html and I noticed the order is as follows: bytes to fill buffer + address of system + return address for system/address of exit + address of "/bin/sh" I am confused to as to why the return address (the P...
I recently set up a python-bottle web server for a school project to essentially open my Garage Door remotely over the internet. Recently I saw the logs had a strange get request and was wondering if anyone knows if I should be worried about this. Just looking up the ip address it appears to be from India I was also wo...
Assuming that both travel over the latest version of TLS, why should I use client credentials? The obvious answer is: The access token will expire at some point The client id and secret will travel only once over the wire We can also use a refresh token, further strengthening the security I argue that we could also m...
I was going through this process https://developer.twitter.com/en/docs/authentication/oauth-1-0a/obtaining-user-access-tokens and there are two points that do not make clear sense to me: Step 1: POST OAuth/request_token response includes oauth_token_secret. What is the purpose of this value? It is not mentioned anywh...
I have a web app where I allow users to create a one-page portfolio using drag and drop, also I allow them to add custom HTML freely (basically any html or js code) I'm aware that I shouldn't allow the custom HTML to be executed while they are in the EDIT mode, so I save it in the database but never render it into the ...
So I hope I'm phrasing this right. I'm trying to exploit a piece of c code which you can see below. #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <string.h> int user_age; void secretClub(){ if(user_age<18){ printf("Come back when your old enough!!"); } else{ printf("Come on in."); }...
I recently encountered a strange incident regarding the 2FA of my Google Account. The user Dunois has described a very similar occurrence in this post: Functional Google 2FA code (via SMS) received from a random (but in use) mobile phone number My experience is a bit different, in the the code itself is also suspicious...
I would like to know if we can really trust antiviruses because virus makers check their virus with antiviruses before releasing them. So how can we place our confidence in antiviruses?
In a project of mine, I have two fields which I need to use for storing a cryptographic signature (hash) of a file, but I can only use 112 bits in total, spread as 16+12 hex chars in those two fields. Since I cannot store a full SHA256, I intend to use a truncated SHA256 value. Which of the following scenarios would be...
Recently I downloaded Open Shell application and checked it via VirusTotal. Most famous antiviruses like Bitdefender, Nrothon, Kaspersky found nothing. But some of antiviruses thing there are some bad stuff in it.
I use Docker Desktop for Windows. I noticed it adds to my OS's host file <ip> host.docker.internal, where <ip> is the private machine IP for the connected local network. (This DNS name is used to communicate from containers to the host machine.) What are the implications of this? Does this mean that a machine connected...
I was reading this question ( How to check if an image file is clean? ) and forest's answer suggested converting the image to a "trivial pixelmap format, such as PPM". Such a format was considered "simple enough that it would be infeasible to exploit". The question is: what makes a PPM file safer? Is it because there's...
If you are logged in with your Google account and click "Manage your Google Account," you can then edit your payment profile. But you cannot (1) see the complete card number except for the last 4 digits or (2) change the number of an existing card. You are only allowed to (1) edit other information of the card like CVC...
I'm checking the options to harden my web app by setting the appropriate HTTP headers. Besides the Content Security Policy (CSP) there are two another approaches: Document Policy and Permissions-Policy (Feature-Policy). I've checked the W3C Relation to Feature Policy documentation, but still can't grasp the clear answ...
I have a laptop on which I'm the only user. While installing the laptop I was wondering why I should choose a different password for the root account and user account. My reasoning is: The change of finding a valid password doubles if the user and root have different passwords. Of course the salting algorithms make su...
I have just stumbled upon what is a very helpful flag in chrome (for developers): chrome://flags/#allow-insecure-localhost The flag is described as: Allow invalid certificates for resources loaded from localhost. Allows requests to localhost over HTTPS even when an invalid certificate is presented. – Mac, Windows, Lin...
My traffic goes trough 6 routers in sequence. +----------+ +----------+ | | 192.168.3.2 | | | Internet | +---------->+ Router 4 | | | | | | +-+--------+ | +-+--------+ ^ | ...
Modern password-managers are moving towards a "fully-in-the-browser" model (see: historical RCE on LastPass, and now 1Password is also moving towards 1Password X as "the future" and no longer adding new features to the non-browser-extension version of their products). Several sources indicate that using other browser-e...
I read this post: How does hacking work? and I saw that Chris Dale answered the question with some PHP exploit instructions. However, how does a hacker can read a PHP file (or another back-end file), since it is in a server? What do hackers do to reach a back-end file in the first place? is it done with pre-made tools ...
I am building an application that is integrated with a 3rd party service provider and uses OAuth 2 to obtain permission from other users using the service to access their account information. Based on the documentation, the implementation process is: A user clicks a frontend element of my application, which makes a ca...
When I do in linux root shell cat /boot/System.map-$(uname -r) it returns me segments of memory but there is a big gap around phys_startup_64: 00000000000228c0 D softnet_data 0000000000022a80 d rt_uncached_list 0000000000022ac0 d rt6_uncached_list 0000000000023000 d kvm_apic_eoi 0000000000023040 d steal_time 0000000000...
I looked at my Credit card statement, and noticed a fraudulent charge to what turned out to be the NY Department of State. This was especially odd to me, since I don't live in NY (and so was obvious fraud), but I also couldn't understand how a criminal could monetize this. Some Googling reveals that other people have ...
I was wondering if it would be possible to create some sort of ethernet passthrough device, but this device also functions as a layer 2 mac address spoofer, which can be used with any device without the need for a software mac address spoofer, or for devices which are incapable of changing their mac address normally i...
Recently I have installed RKhunter (v1.4.2) on a couple of loadbalancers ( Haproxy 2.0.14 ) running on Debian 9. Stretch. While performing a full system check I'm getting a lot or warnings about tcp ports being used by Haproxy. They look like this: Use the 'lsof -i' or 'netstat -an' command to check this. Warn...
Phone is rooted Basically I want to be able to access a website without it being able to determine any of the things it dermined about me (my device, ip address etc) when I accessed it last, no matter how advanced of a tracking mechanism it uses. I want it to seem as if it is being accessed from a different device, com...
I need to save very sensitive data from an Excelfile that the user uploads. The data will then be saved to mySQL. All is done in Node.js. Now I wonder what is the most secure way to upload the file. Should I use Multer (https://expressjs.com/en/resources/middleware/multer.html) which has a memoryStorage option (a buffe...
Assume an Angular SPA application on www.example.com that works invoking an API over that same domain www.example.com/api/... The Angular app gets a session cookie and sends it in each API call. The usual CSRF attack would try to execute a script with some API call, such as POST www.example.com/api/deleteUser when the ...
I have a login system for my website that works as follows: In the database I have a table called users with the fields user, password and authentication_token. user gets set manually by request in the database. When a user activates his account, the following script stores his password and an authentication_token to t...
I'm interested in becoming an ethical hacker someday. I've been reading articles saying the Python language is very popular in hacking activity because of the extent of its modules (including network). Nowadays, lots of applications are web applications or mobile ones and the antivirus software make a great job removin...
We received a message from the IT bods this week stating: Summary of the issue: IT will disabling and blocking the use of the browser Firefox next Thursday the 03.12.20 on all IT managed devices. Due to certain vulnerabilities and security risks associated with the use of this browser it will be blocked from use as of...
Suppose someone hacks my computer (by any means, say a virus or trojan like RAT), will they be able to know my IP address in real time? This is about dynamic IP addresses.
When you search in Google for user cookies top results are VPN services that say that it's used by ISP to track the users. Wikipedia Supercookie say nothing about HTTP headers and what exactly are super cookies. I'm interested what the subdomain can do to harm the domain. Are supercookies the same as HSTS supercookies ...
What are some example attacks that could be vulnerable if HTTP is used, and that can be overcome in HTTPS? The only one I can think of is man in the middle attacks, where the intercepted traffic is in plain text. What are some others? Also are on-path attacks and man in the middle attacks the same thing?
It happened to me a few times that I installed a Windows PC after the CMOS battery has been replaced and all sorts of things stopped working or threw security warnings, only to realize that I just need to set the clock, or click on the sync button. From the above experiences I deduced that time synchronization is impor...
I'm using a VPN which works fine, unless when on Firefox a website asks if they can access my location and I click 'Yes' then it reveals my real location. How is that possible? Is there any way to click Yes with it revealing the VPN location? since some websites don't seem to work properly without a Yes.
The OAuth attacker model (see https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics-15#section-3, A4) states that (A4) Attackers that can read, but not modify, the contents of the authorization request (i.e., the authorization request can leak, in the same manner as above, to an attacker). This descr...
I’m currently trying to get some knowledge in SQL injection. In a pen test environment, there is a challenge on which you get the PHP file and you need to try to login using SQL Injection. I’ve already tried several injections but cannot find a way in. My PHP knowledge is quite basic. May someone help me and give me a ...
Currently, I'm using 1 SSD and I think it's safe. I'm thinking about using 2nd SSD for unsafe software (pirated software). Is it possible that the virus on the 2nd drive can reach the 1st drive, somehow damage the PC, or bring other unwanted effects? There is a BitLocker disk encryption turned on on the 1st drive. I'm ...
I'm currently developing an Android Application that communicates with a server and needs the user to login. The connection is secured with SSL and certificate pinning. For user authentication I'm currently using challenge-response. The server stores a PBKDF2 hash of the password and the salt used in the PBKDF2 (called...
I'm trying to decide whether or not to use the Your Phone app on Windows, and not finding much information on it. It requires a Microsoft account, but I don't really see why that should be necessary for a local connection between my phone and my computer. It makes me wonder about the privacy implications. This page cla...
I'm currently doing a pentest for a client and I've come across something new to me. When I log in, I view the username/password values in burpsuite and find they are encrypted using Cryptojs. I'm looking at the debugger in the browser and come across this function: const encryptParams = parameters=> { if (parameters...
currently engaged in live competitive red vs blue team exercises in an enterprise style Windows AD environment. My device runs a modern Debian Linux OS. cscotun0 We typically connect to the lab/domain directly via ethernet, however I've discovered I can also connect via Cisco AnyConnect VPN, which might prove useful. W...
I was completing an assessment for a client and discovered that web application implemented a Permissive CORS policy which allowed for a Arbitrary Origin Trust. Request: Host: [REDACTED] User-agent: blah Accept: */* Accept Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Origin: https://arbitrary-domain.com Conn...
Do I have to hash passwords on the client side of a banking mobile app since i am using a SSL network to send the password to the server end for hashing. Can the password be intercepted before transmission?
Our development team is implementing TLS protocol for a web server. The type of clients are mobile apps and web browsers. Now there is a concern about bypassing TLS in any way trough MITM attacks and disclosure of the server's private key. Is there any solution independent of TLS for data-in-transit protection so that ...
Just found this on GitHub: https://github.com/gnxbr/Fully-Undetectable-Techniques/tree/main/minizinh0-FUD I can imagine similar ransomware, malware, viruses exist. AV is useless? Is only Behavior Analytics the way to go? I can imagine you can implement several layers of security to catch it (i.e HTTP inspection when ma...
I'm working on designing a credit card payment form whose core functionality is provided by a payment processing company ("upstream"). Upon some transaction errors the upstream returns the detail (*one kind at a time) of the user-provided data that was wrong, for example "Invalid CVC" and "Invalid expiry year." With th...
There is an app on Github I was in a rush, so I didn't check, but there is no explanation or source code in its repo. How could I check if it is not just sniffing my information or something? Is there any way to ban it to do anything on my system?
I have a web application and we are working in an agile environment, and the QC team working and need to run security testing. When I can run the security test? I searched for this topic and can't reach an acceptable result for the team.
In the company I work for, we have many clients and the vast majority of them have hosting with us and we make their web apps. One client, though, just applied for cyber security. Our CEH (certified ethical hacker) asked me to make an exact replica of the client's login site to test phishing on their cloud service. All...
Encoding a payload is a means of evading antivirus or IDS. With regard to scripts is there a way to do the same thing? For instance, is it possible to encode a python script in order test intrusion prevention systems? This script here https://github.com/SecuraBV/CVE-2020-1472 ,is there anything I can use to disguise it...
As per some network certification training material, I noticed the following description of the Time To Live IP header: The time to live (TTL) is set into a packet when it's originally generated. If it doesn't get to where it's supposed to go before the TTL expires, boom - it's gone. This stops IP packets from conti...
When using 4g or other cellular networks, while roaming, mobile carriers transfer data between each other, something I've seen refered to as "ITS: Internation Transit Service" how does that work and how is it secured? Does anyone have some insight into what sort of security measures are taken between mobile carriers wh...
SCENARIO: If I send requests like these: http://site.com/page?safe_param=1?my_arbitrary_param=2 The server responds with a normal HTTP response but within common headers it includes also the arbitrary param: [...] my_arbitrary_param: 2 [...] How could be this leveraged?
I'm wondering how apps that leak personally identifiable information can be taken advantage of by hackers? How would they have the infrastructure to capture all that information that come from thousands of users? I'm asking because when analyzing applications, the hacker/analyzer will be the one setting up the network ...
I'm currently in the process of researching for an assignment. In this assignment, I am asked to produce reports on new crimes enabled by technology and how, in Cyber Forensics, one would investigate said crimes. I am having great difficulty finding information on how one would go about investigating DDoS attacks. The ...
Suppose I have this: parameterized_database_call('SELECT * FROM widgets WHERE id = $1', $_GET['widget_id']); The SQL query is parameterized, as I've done for many years now. (I'm trying to repress the days when I did not use those, or that another way was ever used/taught.) As I understand it, this cannot possibly cau...
I've chased my tail into a late night circle thinking about public key authentication to cloud instances. As such, I have some questions on the function of host keys when authenticating an SSH session. If I'm on machine B, and use ssh-keygen to produce B.key and B.key.pub on machine B, I can then use ssh-copy-id to sen...
A cloud operator such as Google can take a snapshot of a normal VM. This includes CPU state, RAM and disk. This can then be copied to another physical and resumed there. Or it can be analyzed off-line, and any cryptokeys in memory or in the CPU state can be extracted. This means that if you do not trust your cloud VM p...
I was reading the OWASP Cheat Sheet Series, specifically their cheat sheet for REST Security and one of the points they had under the section for API Keys was: Do not rely exclusively on API keys to protect sensitive, critical or high-value resources. What are the alternatives to protect resources via a REST API that...
I have a local application that normally authenticates against a remote Active Directory server. If the local host loses network connectivity, a special local account becomes available for login. Currently, that account has a standard password that our technicians know. In the event that our technician is unavailable, ...
I bought a wifi camera and performed the simple startup process: Powered on Discovered the camera through the dedicated App Set the WiFi credentials on the App to pass to the camera After that, the camera gets connected to my WiFi network and I can use the device. I'm curious about how the App passes the WiFi credent...
I have been reading about the security and performance implications of rel="noopener" and rel="noreferrer" in links with target="_blank". These are some of the observations: if you open a link in a new tab from your app, by default it would have access to window.opener and would be able to change the url for it (rever...
Considering that all modern motherboards have code signature procedures in place like it is mentioned here: Is it possible for malware to be in the BIOS or in hardware? I was wondering is it safe to just download BIOS firmware from anywhere on the net or using HTTP? Is it possible to install an infected BIOS firmware o...
I understand that the answer is probably that ideally, I would just have a secured api, but I want to understand the threats that exist as well as the defenses. And all of the articles I've read focus primarily on "they could come in and take your data," which just isn't my problem. Say for example: I have an api that...
I am trying to understand how websites implement in-browser account switcher. e.g you can login to twitter using multiple accounts. On the bottom left when you click your currently logged in account, if you have multiple accounts, you can see them all and simply switch by clicking a different one. How does this work? T...
I have heard online that simply visiting a website can infect a computer. I had an instance recently where someone I know sent me a link but misspelled it. The misspelled link lead to a malicious website. The misspelled link was: WARNING WEBSITE MIGHT BE MALICIOUS http://ww1.vassarstat.net Which is a misspelling of ww...
I have a registration login process which includes a one-time activation link sent via email when the user registers. When the user clicks the link the account get's activated. Now what error message should/can i show to the user when he tries to login with valid credentials but the account not yet activated via this o...
I'm learning Web Security currently, and my tutor left this practice for us. Is there any solution to bypass this js statements and as a result, for example, to display alert(1)? Thanks! input = input.replace(/-->/g, '') return '<!-- ' + input + ' -->' I know how to do it without the replacement. But I'm stuck on the ...
Please assume that I use some FOSS, SaaS, public key && passwordized private key protected password vault program to primarily store passwords of websites I rarely use (such as Q&A websites or free content enterprises), which are not very "sensitive" by means of security and that I wouldn't have any significant damage ...
I want to export the configuration details from an existing CSR or Certificate to a config file which I can use with OpenSSL to generate a new CSR. Background Our CA has changed. For the old one, I submitted a CSR and a list of subjectAltNames and the CA team sorted it out. For the new CA, I have to submit a CSR with...
I need to verify that survey respondents are in the same physical room or video chat (to prevent industry espionage). The respondents can join by scanning a QR-code that opens a URL which embeds a code with 61 bits of entropy. The code and QR changes every 5 minutes. However, as URLs tend to be considered security by o...
Recently I faced argument that threw me a bit off balance. I've been suggested that running application bare metal is actually more secure than running it in container. Reasoning behind that is that even if your containers run on user privileges, still containerd (unless it's running in rootless mode) runs as root so i...
which methodology of pentesting for industrial soltions (DCS/SCADA/PLC/Cotroler Servers network with OPC connectivity) would you recommend to apply?
This is where I took this example from: <a href="<?php echo $_GET['e'];?>">Back</a> In this code, I can do http://my_url?e=javascript:alert() But what can I do if my code is like this: <a href="e<?php echo $_GET['e'];?>">Back</a>
I need help understanding what is happening on my LAN and determine if a malicious attack is taking place. The "attacks" started to occur for the first time last night. This morning, I open my computer to find over 100 remote-access attempts that were block by Avast (Avast Remote Access Shield labelled them as SMB:Brut...
I have a query regarding best practice of using PGP to sign emails with Thunderbird 78. Thunderbird 78 took an existing system by Enigmail and brought it "in-house" to be built into the email client program. This results in some notable changes which -to me- are concerning and I wanted to double check if my concerns ar...
I may have found a security bug in GNU Scientific Library (https://www.gnu.org/software/gsl/) and would like to request a CVE ID number with it. According to the procedure explained here: https://cve.mitre.org/cve/request_id.html#cna_participants, I will need to contact a CNA. But none of the listed CNAs seem to cover ...
I'm trying to create a lab environment to experiment with MiTM attacks. I want to learn docker also so I've decided to do this with docker. I created 2 images (attacker, victim): Victim - based on Alpine, with curl installed Attacker - based on Ubuntu, with installed iputils-ping iproute2 curl iptables vim ettercap-tex...