instruction
stringlengths
24
29.9k
I am preparing for a security exam and a question I failed in a practice has the following: A command line tool that can be used for banner grabbing is called: A) tcpdump B) netcat C) nmap D) Wireshark I chose nmap, but the correct solution is apparently netcat. I am aware that netcat is used for banner grabbing, but ...
If I have a web service (REST API, RPC, etc) that I open source, how can I prove to the user that the service they are connecting with is indeed the same one whose source I published. I am envisioning an endpoint they could query and get some kind of hash/signature they can validate. The problem seems that the API serv...
Recently I've been studying SMTP and I've wrote a program that uses socket programming to send emails via extended SMTP (RFC2554). As I understand, in this protocol one sends base64 encoded strings of username and password to the mail server. But since base64 encoding is not encryption, how can I ensure my username and...
yesterday one of my client's system started to popping this message, is the threat legit, what options do I have to restore
If I connect to my VPN and then run arp -a the MAC address of my router changes to 00:00:00:00:00:02. Is this normal behaviour? What is the reasoning behind this? Furthermore a MAC address spoofing is only of real concern when there are more than one devices on the network, and they try to become the MITM correct?
What are the security implications that come with loading an image in dataURL format <img src="dataURL" />? After signing into my website the browser loads an image in dataURL format for first time and take a few seconds to load. Later when I come back to the site and attempt to load the same image the image is loaded ...
Consider an application in which users will install on-premise agents which communicate with a cloud hosted service (aws in this case). The users can interact with the cloud service to configure and assign work to the on-premise agents. The cloud service will be multi-tenant, and will store some sensitive customer data...
I have an SSD with the option (with ATA-commands) to erase the firmware for security reasons. In the firmware flash cells, the secret key is stored for encrypting the data on the fly. When I ask the vendor how it is deleted, they tell me it is erased. But I would like to know "how it is erased". They tell me the cells ...
I want to know if is bad to trust the PHP's global variable $_SERVER values. I have a scenario that I change between developer and production site, and I have a config.php file. On this file, I check $_SERVER['SERVER_NAME'] value, to determine which group of constants I should use. If I'm on production environment I us...
What is the most secure way to automatically connect my remote server via OpenVPN to my home network for running a script? The plan is I want to automatically backup some folders to my Synology NAS at certain times. I assume saving the VPN username and password in a file is one of the worst ways, but on the other hand ...
I've received notice from our risk management group that they believe our website falls in scope for SAQ-D. We utilize third party vendors for all of our payment processing - and on the website essentially just provide static links (href="ourcompany.someprocessor.com") to direct them to the payment processing sites. T...
I am an application developer and am building a token-based auth mechanism for my application. Essentially, the user will log in with username+password, if the credentials are valid, my code will generate a JWT (probably going with a 30-minute expiry, at least to start with). If they attempt to request authenticated re...
I got a call from an unknown number, more specifically, a no caller ID number. I’m not the guy who gets a lot of calls from a no caller ID phone number, and usually, when I got one is typically the hospital, nothing suspicious. I know in Canada and many other countries, carriers allow us to hide our numbers without any...
I am using a couple VM's fitted with proxies and find that browser fingerprinting across VM's causes me many issues. I also have issue with the browser created inside VM leaking that I am using VM. May seem like a n00b question, but is anyone able to give insight into the best setup for using multiple VM device browser...
Is there a course or resource for a person with basic networking skills to see all ways a website like FB or Google can track and identify users + how to spoof them and look natural? Not for malicious activity just feel frustrated by the lack of information available on this online. Like, let's say I have 2 devices on ...
During the setup of a new encrypted volume, the VeraCrypt requires a random mouse movement within the window. If someone looking from the outside can see that a monkey sitting in front of a computer playing with the mouse. There are good solutions to generate cryptographically secure keys like the usual /dev/urandom [1...
This could be basic question as I'm new to this area. I have an apache web server which load balances to a set of servers to provide a web site. The apache server has SSL enabled and we terminate TLS on load balancer level. The TLS certificates lives inside the apache server's local storage. Now our target is to use so...
I'm testing burp against a vulnerable application as part of work for my client. There was one successful xss payload related to DNS lookup which worked on form data at point of file-upload. Here is the part of payload javascript:/*</script><img/onerror='-/"/-/ onmouseover=1/-/[`*/[]/[(new(Image)).src=(/;/+/7mu0war5msd...
I'm trying to understand how the hash length extension might work on real web applications using a hash for MAC. Especially what I don't get is, how the application considers the evil forged hash valid. Let's say we have an app which sends this and I want to tamper with data POST /stuff?mac=d147c7b4a79f920a1efefddc30da...
I maintain an operating system that can be deployed to embedded devices with highly diverse capabilities. One of the aspects of porting the OS to a device is declaring the available entropy sources (including, but not limited to, dedicated TRNG peripherals) which will be used to seed the CSPRNG. The security goal of th...
I know that you need to change permissions for a file to run as a script on Linux. Is that enough to prevent any malware from being installed by some self-extracting file? Is there anything that can be done to increase the security on a Linux machine? Also, can a self-extracting file be of any file format (other than a...
In the recent past I have been a victim of virus/malware attacks on my home computer running Windows 10 (Home), since I used the same account with high access rights to also browse the internet. However, to mitigate the risks I have upgraded to Windows 10 (Professional) and have also created a standard-user specificall...
Would concatenating (i.e. joining together into one string of text) a secure (i.e. Diceware) password and other, much less random, passwords be a good idea? This new password would be used as master password for my password manager, and, since it would replace all my passwords, why not concatenate all of them into one ...
Take the following examples: When I run sshd, it can in theory grant access to anything that the process itself has access to, regardless of provided credentials. For example, I could in theory modify a single if statement in the sshd source to grant access to my home directory to anyone. On the other hand, if I encr...
How does John The Ripper work when trying to crack passphrase of a private ssh key? What steps are involved when it tries to do so? What's the role of ssh2john in the whole process?
I have been reading about authentication and authorization for the past few days and I still have not figured out what would be a reasonable way to deal with this for both mobile and web applications. From what I read, when it comes to a web application, using an access and refresh (JWT) tokens seems to be quite popula...
My parents live way out in the middle of nowhere. The only service provider that is not satellite is Century Link, which uses ADSL / phone lines. They wanted me to set them up, and the service guy was trying to charge them a rental fee per month for the modem; I dug around in their "old technology" bin and found a West...
Assume we use AES256 to encrypt the same payload 100 times, each with a different key. An attacker gains access to the 100 encrypted payloads, and nothing else. Is there some way the attacker can gain insight about the payload (or about the keys) based on those 100 encrypted payloads? What about accessing 1 million enc...
I've been reading online that homebrew changing usr/local/bin to r/w could pose a serious security issue as usr/bin is the path after usr/local/bin. Article found here: https://applehelpwriter.com/2018/03/21/how-homebrew-invites-users-to-get-pwned/ Is this legit and an actual safety concern? I'm new to linux paths and ...
This question is about how to secure API keys. Not sure if this is in the same category as Key management for Cryptography and should follow the same rules. See details below. We currently have hybrid Mobile Apps. The apps are made using Angular and Ionic. Now, we have some functions where we would need to use some of ...
I was reading this question on Stack Exchange Workplace community and it indicates that an IT team was able to prevent a user from turning their laptop on (power on). My laptop access has been shut off (IT somehow remotely shut it down, it won't power on), company cell doesn't work, can't access e-mail via webmail. I...
Does a X.509 Certificate contain some kind of ID that is associated with the Private Key that was used to create the Certificate? So if i had a database of all my Private Key IDs, i could then look at a Certificate Field, that contains the ID and know which Private Key was used. If so, what is the field? And is there e...
I've installed NextDNS on my iPhone and started noticing random connection requests to *.aliexpress.com, live.musical.ly, amazon.sa, and others. What made me wonder is that I don't have "background app refresh" enabled, No app from TikTok, AliExpress, or Amazon is installed and I had the phone locked ("standby") durin...
The Microsoft ktpass tool can be used to generate a .keytab file that contains a secret key. I'd like to understand the output of the tool. An example output can be found here. I'm interested in the following part: keylength 16 (0xdd74540caa4a230af2ed75558a37995d) The Microsoft documentation is quite vague on the exac...
BIOS, UEFI and hardware's firmware ROMs are not very comforting sources for concern. On a system that I administer, a large amount of main system memory (9 of 512GB) is unavailable. Next to the unfortunate loss of a valuable resource (main memory), I am concerned with the question how to evaluate this "opaque" memory t...
I just got a message from a security guy that my application is executing remote code if they pass a Content-Type: image/asp. For now he does not disclose anything. Now my question is that if I am using ASP.NET 5 MVC application using IIS webserver on Windows Server 2012 R2, can you send a specific content-type to web ...
I'm using a free template as a front end in my application and the main javascript file came out as a high risk as it's vulnerable to a dom based cross site scripting.Is there a way to sanitize the javascript function inside a javascript file? I searched and i found a .net library "System.Web.Security.AntiXss" that wor...
I have a IPv4 network behind a pfSense firewall at my small business. We have around 200 IP devices on the network. We have about 30 Axis IP cameras which have MJPG streams embedded into webpages as img tags. The webserver is internal and external facing, but we don't have a proxy for the cameras and thus only use the ...
Let's say we have: a local computer (Windows or Linux) a distant dedicated server with 2TB storage, running Linux I'd like to do a backup my local computer's data folder (1 TB) to the distant server (updated every week of a few GB), but I have a very specific requirement: I want that that even if a hacker gets root...
Background As many others I am working from home and we use a VPN to access services from the company intranet (SMB fileshares, git repo, project management etc). To improve things like video calls I suggested to our IT to enable split tunneling to allow traffic not determined for the company intranet to use the home i...
I'm planning to donate a laptop to a school, for kids to use from home during the pandemic. It's my previous work/development laptop, so I want to erase the drives as securely as possible (within reason, I'm not exactly expecting a state sponsored attack.). But keep them in good working order. There's both an HDD and S...
X-Frame-Options HTTP header is used to tell if a webpage is allowed to be used in a frame/iframe. Frames can be used for click-jacking/UI-redress attacks. It is advised to set X-Frame-Options to 'DENY' to prevent page being used for click-jacking. But, is it not possible for the attacker to tamper the headers (esp...
I use opera browser, and while the built-in VPN has been working relatively well it's been preventing me from joining discord voice calls and using omegle. Is there a way to hide my activity from my ISP without encountering those problems?
I don't have an instagram account, but I always look to my friends' profiles on instagram or mystalk and see their stories. BTW my google account is always signed in when I check their stories on instagram or mystalk. So my question is: in what cases they will know that I see their stories? For example, can they know (...
I'm working on a centralized exchange for cryptocurrencies. the approach that I'm taking for some reasons is to create an account(private key) per user inside platform. so these accounts should be controlled by platform. now my problem is how to safely store private keys in server and then safely retrieve them for sign...
How do I hide my ip address if I use a wallet as coinomi? Do I have to use Orbot? If yes, what exactly should I do? (I'm using it from an android) I just want to have privacy when I log into the wallet. I want to hide my ip when logging into it.
A typical scenario: a big company with lots of servers in all shapes and colors (on-premise, private and public cloud) Each server (or rather each service) needs to maintain a trust store (a file in Java, or a file folder in Node.JS) that contains certificates required to establish SSL/TLS connections to other (mostly ...
I've created my own CA with openssl. The problem I'm having is that when I sign a CSR and generate a PEM certificate with it, there is an initial text portion in the certificate where I was only want the actual encoded certificate itself. In other words, the output certificate begins Certificate: Data: Vers...
ISO 7816 smartcards are typically used in EMV transactions. I know that the card can perform arbitrary actions before sending a response to the terminal in a typical EMV transaction (e.g. signing dynamic data to generate SDAD). However, is it possible that the card perform a certain action while waiting for a command A...
When I did my degree ~20 years ago, the contents of an email were described as being "as secure as a postcard". Since then, HTTPs has become standard for web browsing and the absence of security is noteworthy; have equivalent changes occurred with email, or is email as bad as it ever was? (Target level for answers: I h...
In our web app the users can specify a URL that the server will access later (POP3 access and browser push notifications). This means the web app does a network request to a user-chosen server. The web server might have access to parts of our internal network or some services might be running on localhost. ...
I am attempting to solve a CTF challenge where I am logged in as a member of the www-data group and the apache2 service is misconfigured and can be run as sudo without a password. What I am attempting to do is access a token stored at /root/token.txt. From what I can gather I need to get apache2 to run a shell script w...
A very strange sequence of events resulted in some unknown person gaining access to my online banking (with CIBC). I've since recovered my account, but I am very eager to understand what happened: I live in Toronto, Canada. I and many people around me regularly receive spam phonecalls (e.g. "The IRS" claiming I am wan...
I have a web application which has a small subset of users who need to read data from various places on their desktop (e.g. a serial port) and send that data to the browser session to process and then store. One way that I'm considering accomplishing this goal is by writing a very small desktop application that would a...
Background When I explain to my clients the security issues around email spoofing, I often explain that emails are like regular mail. Anyone can write Jon Doe on the return address, but that doesn't necessarily mean that Jon Doe sent it. Potential Solution? Why can't an email server be setup to receive the following fi...
Is it even possible? I have an application that is susceptible of a same person creating many different accounts on different IP addresses. How to fight against this the best? Using 2-step verification like SMS? Any other ways?
In a web application, is there a security advantage to forcing a newly registered user to manually log into their account, or is it safe to automatically log in a new registration? Assume that the user is registering using a local registration/login strategy, and their credentials are an email address and password they...
If you don't have a botnet and you needed to use an application with a new IP address on each page load, how would you achieve that? How many different IP addresses can a person have? What does it depend on?
At work we have a pretty complex problem(for me at least) and I have no idea what a fitting solution would be. To give a bit of context, the company I work for is a data processor/provider for big corporations that need sensitive user data such as; social security numbers, how much a person earns, all their past addres...
I am working on exploiting an application on MIPS to further my knowledge of ROP chaining. The library I am trying to build a ROP chain is libuClibc-0.9.30.3.so. I found a gadget that I want to use using Ropper. The offset is marked to be, 0x0002a730 and the instructions that Ropper show are lw $v1, 0x1c($sp); lw $ra, ...
Recently I was on Nox Player's website checking out their Android emulator. I did some googling and came to the conclusion that it was bundled with tons of malware and as a result didn't install it. In the process, I accidentally clicked on the Windows 10 download link which began to download an .exe file. I immediatel...
Given a server hosted on a cloud platform, what would stop the cloud platform owner from stealing the server's data and/or code? As far as I can tell, a motivated cloud owner could retrieve the data in its servers while keeping plausible deniability. Certain large companies also seem to have incentive to do this, as th...
I work on a large e-commerce project, the app in question is written in Kotlin (legacy code in Java). Recently we got the following question from the web team which instantly triggered my alarm bells: "but you could create a native method which receives X as String and then we can call this method from our side, passin...
The school has a few security measures in place to ensure students are not going to inappropriate sites based on content. In this day there are more students being sent to YouTube to watch educational videos that are assigned by the teacher, so YouTube is not blocked. However, the issue that is students have figured ou...
If I have a locally running Postgres configured to trust all connections from localhost, does it mean any website I visit has the ability to make a localhost-to-localhost connection to Postgres with JavaScript running in my browser?
I keep hearing about refrigerators and automated vacuum cleaners being targeted, but do the owners manually configure these devices to connect to their wifi network or do the devices have a work around? Are there any IoT devices that are not connected to your WiFi and are those of any security concern besides possibly...
I have a ton of hashed texts and their decrypted or de-hashed forms (I don't know which term is suitable in this case) via bcrypt. The thing I want to learn is how they are decrypted. For example, the second text after the first colon is the salt and the last one is their plain versions. $2y$12$./BuBOjyTdqysbY1eR7TC.pX...
I was trying to debug an application that was not working on specific environments and in my research I had multiple sources refer me to the tool Process Monitor found in \live.sysinternals.com\tools. Not having admin access to my machine I made a request to IT to get permission to install and use this tool. Fast forwa...
A fresh incognito browser will not have access to any cookies An active session however, will surely save cookies somewhere so I don't have to login to gmail every time I access gmail.com in the same web-browser session My question is: does incognito mode prevent 100% of cookie-stealing methods of identify fraud
At one point today my teacher was saying that we shouldn't have social media etc. They also at one point said that the school could access (and view "everything") on our iPads when we are connected to the internet. They did say that the school decided not to do this, but it still bothers me that a network that I connec...
I know Javascript Cryptography is considered harmful because: Secure delivery of Javascript to browsers is a chicken-egg problem. Browser Javascript is hostile to cryptography. The "view-source" transparency of Javascript is illusory. Until those problems are fixed, Javascript isn't a serious crypto research environm...
I want to use gpg -c with a user-generated password that I can easily remember. Are 16 characters enough? for example would a password similar to "I own 32 houses." be bruteforcable?
I want to sign every file in a directory. I can do so with the following shell command, but it's slow. Serial Execution: find . -type f -printf "Signing %p...\n" -exec gpg --quiet --batch --yes --detach-sig {} \; I have 16 CPU threads and would like to take advantage of these (mostly idle) threads to speed up the sign...
I'm doing UDP scans on some internal servers and want to add a custom token (randomly generated string) to packets as much as possible in order to later filter out my scans from real non-testing traffic. To attach my token to my nmap scans, I'm using --data-string sudo nmap $ip -sUV --data-string "my_token" However, U...
Often I am required to connect to public wifi or open files that others send me. Doing so opens me up to possible credential theft as well as possible viruses or malware. Thus far I have done my best to lock down the system by enabling firewall, installing a reputable malware scanner (Malwarebytes), and enabling device...
I am working on Social Engineering attacks happening via SMSs. Let's assume a person receives an SMS asking him to click on a malicious link. If a virus is installed on the person's device, how can OTP be used to prevent this attack? If OTP cannot be used, are there other techniques that can be used to mitigate this ty...
Trying to do this to distribute the work of creating a lot of users in which their passwords are hashed. This will cause the server to do a very large amount of work. The idea is this: (Assume encrypted traffic) ==== Creating User ==== Hash password client-side Send username and hash(+salt) to server Server saves it d...
ssh-keygen has the following options for a key type (-t): dsa | ecdsa | ecdsa-sk | ed25519 | ed25519-sk | rsa I am not familiar with the -sk notation and it's not explained in the man page. What does it mean?
I am new to InfoSec role, and not really sure if it includes responsibility for monitoring: that's, when we write policies and procedures, who is checking whether they've been obeyed or not? Is it internal audit, is it InfoSec?
I was wondering how rar decryption works. I know that when I enter a password to encrypt my rar file, my password is derived into a key that is used to encrypt the rar file. But how does the decryption work? How does it know if the password I entered is the good one or not? I guess it could work 2 different ways: I e...
I have a MySQL lab challenge where I send id=1‘ and select @@version;# then manage to trigger an error. But the part of the error response that has my version info looks like it comes back in binary (or Unicode?). I have to send the GET in base64 then URI encode as it’s sent from a cookie parameter. How do I make sure...
My school supposedly cuts everyone's connection at exactly 12:00am. Although the network is still there, Windows shows the "no internet" sign when connecting to the network. However, the strange thing I have been noticing is that although the school wifi blocks new connections (for example connecting to a new website o...
If an IIS web server exposes a site in INTERNET, is it possible for an attacker to access internal sites by simply modifying the host header of initial request to internet site and refer another host name of internal site ? GET http://site1.com/ HTTP 1.1 Host: site2.intranet Through the above request, is it possible f...
So I have this program in C that I'm trying to exploit which has a vulnerability in a function, namely it's using gets. I'm trying to overflow and change the return address so the program returns one or both of the two functions that are not called. #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <s...
I am trying to restrict the intermediate CA to sign only end user certificates. However, I am not able to do so. Man page of x509v3_config says basicConstraints=critical,CA:TRUE, pathlen:0 A CA certificate must include the basicConstraints value with the CA field set to TRUE . An end user certificate must either set C...
A potential client is planning to do penetration testing on our SaaS. Is it standard or fair for us to request things like the following? An NDA from the pen tester Details on who is performing the test (e.g., verifying they are accredited) Restrictions (like no social engineering, DoS attack, etc.) Targeting a stagin...
I'm experimenting with setup.py inside a vulnerable VM that's running a pypi server with a listener on localhost:PORT My current account does not have write access to the following file : /path/to/a/protected/file What i do have access to, are the credentials of the pypi repository running on localhost:PORT So to take ...
Reading other posts like this one give me the impression that the iv can be retrieved from an openssl enc output, and indeed, I see that under one circumstance, it works: # These two commands print the same salt, key, and iv openssl enc -aes-256-cbc -pass pass:MYPASSWORD -p -in foo_clear -out foo_enc openssl enc -aes-2...
I suspect I have a potential XSS vulnerability at a client-side level, however, I'm not able to exploit it successfully. The URL I'm using consists of three parameters that reflect back to the user and it is as follows: https://host/email_url?key=[ENTRYPOINT1]&code=[ENTRYPOINT2]&mode=[ENTRYPOINT3] The HTTP headers of ...
There must be some kind of business that requires the use of sensitive authentication data (SAD) data. Could someone point me in the right direction on the requirement for the storage of that data?
After reading through the answers of the related question (the same question but about integer primary keys), I was wondering if there is any reason to hash uuidv4 primary keys and sending the hash to the frontend instead. Since uuidv4 Ids are random, exposing these ids to the frontend should not leak any information a...
Let's say I sign into my local pc with a hardware key (eg yubicon). Let's say I further sign into a sensitive server (as root) via ssh using yubicon hardware key as well (ie only way to get into server is though ssh when yubicon key connected). Now let's say I click on a phishing email that gains admin access to my mac...
I'd like to ask for small hint with following problem: Using the steganographic method of the least significant bits, hide the text string "Kra" in four pixels of color with RGB code . Hide the text in the sequence of bits of the image one character at a time, ie first hide the character "K", then the character "r" an...
We all know why password reuse is bad: eventually some site at which you have an account that did not properly hash+salt user passwords will get hacked, and your password will be published in a big dump. Then some hackers will take that user/pass combination and try it on every site they think that can get something us...
I have encrypted a hardsik with a 12 charachter random alphanumeric passwrod using LUKS encryption on Ubuntu 18.04 on a 2.5" SATA disk partitioned with ext4. I'm wondering how secure is such scheme? In other words, provided that the cracker has the best software and talent, how long does it take to crack such encryptio...
Today I disabled JavaScript in my Foxit Reader settings because I hope to gain better security against malware embedded in PDF books I read. As some sort of simple check I tried to open a PDF with fill-in forms and see what happens when I try to fill-in some of the fields and check some checkboxes. Everytime I checked ...
If a website is vulnerable to Local File Inclusion (LFI), how can you use it to find out the PHP version? Is there any file which says the version of PHP being used. I'm trying to do a PHP sessions LFI to RCE attack, but I don't know where the session files are stored. I think finding the PHP version will help. It has ...
I have a program that generates a zip file with a password. Is it possible to determine the password if you analyse the program as it is being run? Would calls to function libraries show the password or is there no way to determine the password?
So I know that PDF files can contain viruses themselves if they are target specifically for that purpose. However, my question for here is this: If a webpage that has some malicious scripts or a virus is converted into a PDF using one of the popular programmatic html to pdf conversion libraries (eg. in nodejs or python...
I am working with several maintainers of Homebrew currently to verify that several programs in the cask library now ship from the developer with trojans. To verify the claims I created a Virtual machine in Oracles Virtualbox running Elementary OS (linux based on debian). From there I downloaded the suspected files and ...