instruction
stringlengths
24
27.2k
Not sure this is the right stack to ask this in, it's kind of an abstract question. Say you have a website where it is very important that the personal information provided by the users is authentic. Like age,sex, residency and optionally occupation, civil status,etc. How would you make sure that the credentials they s...
I have the following JS (using jQuery for brevity's sake but it isn't necessary for the question): $("<i></i>").html(userInput); Is it possible for someone to input some string, userInput, such that they successfully execute an XSS attack? I've tried inputting a script tag with an alert in it, but it doesn't execute...
I know when I fill out forms with address and email it will attempt to auto complete the rest of the information. Is it possible to include more hidden fields on the page in order to get more information with the auto complete than is visible to the user? A real life example. I recently filed my taxes online which in...
I'm trying to learn about buffer overflow attacks, both on the stack and on the heap. However, I'm confused about when it's possible to determine the address of the buffer. The classic "Smashing the Stack for Fun and Profit" mentions the need to use a sizable NOP sled in a stack-based buffer overflow attack in order t...
I have a .NET Web Api servicing a Cordova based mobile app and web front end written in AngularJS. I have done a ton of research and most sources don't give a great answer or one that's huge overkill for my situation. Security is not a huge concern but I want to employ some amount of basic security to ensure that only ...
To protect user's sensitive data, I am considering the following 2 approaches: Create 1 data encrypting key (DEK) for each user, use it to encrypt (using AES CBC mode with a random IV for each encryption operation) all data of the same user. DEK is protected and stored separately from data. Use multiple DEKs, 1 each t...
I have recently come into ownership of the above product and was wondering if it is possible to enable monitor mode on said device? I figured this community might have a definite answer, if not a clever work around.
So I've been fighting this problem for months now and decided that it's beyond my limited (if at all) server skills, and that I need help from the pros. I have a VPS (with root access) which hosts several different PHP websites, some of which are WordPress-based. Some of the sites got infected with the a malware as a r...
Given a Web Application with Form-based login and a central directory: using LDAP (fast) bind in an application with the actual user has a number of advantages (opposed to using a service user and doing a password check). It especially means the directory server will evaluate if the login is actually permitted. It can ...
I'm using HMAC exactly as intended to verify the integrity of a message. However, the message is really an associative array (or a hash). Since this will be done on various platforms (within and outside our control), we need a standard way to convert the array to a string. I've seen pipes being used as separators in ma...
In biometrics, most people talk about False Acceptance Rate (FAR) (i.e. what is the chance that two samples of different individuals match). DNA and iris biometrics, for example, have a very low FAR. However, I found that it is very difficult to find numbers about the False Rejection Rate (FRR) (i.e. what is the chanc...
We have an application which is not per user and can be used by multiple users simultaneously. Data is also shared by all users. The path to the data folders we use is ProgramData\OurAppName\Data (post Vista), and we give full control to all users, so that our application run by them can make changes to files under the...
I have been assigned the task of improving security of a specific service. After some analysis of the requirements we have come to the conclusion, that a certain aspect of the specified requirements can only be met through the use of DNSSEC. I have a decent amount of experience with information security and cryptograph...
The popular claim is that a chip-and-PIN payment card is more secure than a card with magnetic strip because the card data is hidden deep inside the chip and the ATM or POS terminal sends the entered PIN into the card for confirmation (or rejection) instead of reading the correct PIN from the card and comparing it with...
I am getting confused with RSA, Diffie-Hellman Key Exchange, PKI and X.509v3. RSA's mathematics algorithm seems like an encryption algorithm, right? Generating public key and private key, using for encryption and decryption... Diffie-Hellman's mathematics algorithm seems just like a key exchange, right? Each side can c...
I was recently reading about automotive fare collection systems and came across loyalty card systems. In these systems, if I understood correctly, each passenger has a card in which a value, not money, is stored. Whenever the passenger uses his card a reader decreases the stored value in the card, and the system admini...
I'm currently developing a payment system where users can use SEPA-debit to pay for the service. The user has the ability to enter the data once and can then select the same payment method when making another payment in the future. So in order for the user to select the proper account to debit, I need to show some info...
My father's computer is now infected with CryptoWall 3, according to the link below. http://www.bleepingcomputer.com/virus-removal/cryptowall-ransomware-information#CryptoWall Is there a way to decrypt the files? I will try to recover them but according to the link, the virus safe deletes the copies of the infected fil...
I have recently come across what I believe to be a serious flaw in the security of a 3rd party computer program used within my company. Apologies for deliberately keeping details vague, but I hope you understand! When entering items into the database, one cannot enter a single apostrophe into the name field - users hav...
This currently works on all iPhones and one known android phone as of today, a formal complaint has been filed with the carrier and the FCC. I doubt they will do anything about it though since this is SMS protocol working as intended, and any particular spoofing technique is not (from what I can tell) interesting, and ...
My idea is to use encrypted tokens - where upon authentication (with username and password), backend would encrypt user_id, timestamp and an SHA-256 over those, base 64 encode it and return to the client as an access token. This way I can eliminate the need for a persistent token store. This is similar to the scheme de...
A potential contract requires the following sensitive information to be persisted in a postgres database: Bank Account type (Uk/Int) Bank Account Number Bank Sort Code Passport Number Passport Issuing Country Driving License Number Driving License Issuing Country Persisting this data terrifies me. This information i...
I have been running scans on a few web applications that require a typical username and password to gain access to the website. I usually remain logged in through the browser my proxy is running through until the spidering of the website completes but I was curious if that was necessary once I start actively scanning h...
If an error occurs, our web shop generates an error-code that is shown to the user. At the moment, it does not contain a time stamp but only the day of the month. That is non-intuitive but I assume the original intention was to give potential attacker as few information as possible. However, it would be more convenient...
How do I encrypt data in PHP, properly, using symmetric-key encryption? I have a message M and a secret S. I'm looking for a solution that uses cryptography properly without making any of the usual mistakes. In particular, the solution should use authenticated encryption, choose IVs properly, and generate the actual...
What utilities are good for notifying admins of SSL certificates that are about to expire? Symantec and DigiCert have certificate management products, but what systems or utilities do you use to keep track of expiring certificates?
Today I had a hard time explaining the difference to a friend. I know seeds are used when generating "random" strings. And salts are used when providing different outcomes to a hash. What is a better way of describing these concepts and their possible differences.
I'm working on a site that has CMS functionality. I'm considering allowing users to upload Flash (.swf) files and then displaying them on my site. Is this a bad idea? Is there a way to do this safely? What are the worst things that can happen, both to my servers and to visitors of my site? What precautions can I t...
In the traditional form, a password database is similar to any other database file, except the contents are encrypted using a key derived from a passphrase entered by the user. The user enters their passphrase, decrypts the database, reads some entries, writes/changes some other entries, re-encrypts the database and wr...
I have a professor that has online quizzes. They mentioned on the first day that they can see the other tabs open in the browser so don't try to cheat by looking up answers. Is this possible? If not easily doable, in what ways could the professor (or hacker) view your open tabs - even if it's illegal?
We're trying to implement a patch schedule in our environment for both linux and windows systems. I'm curious to hear how often other enterprise companies are patching their servers so we can get an idea of what the rest of the world is doing. I've found plenty of documentation from SANS etc on the policy but haven't...
I have read about the adware vulnerability here. An adware is a software that automatically displays or downloads advertising material like banners or pop-ups when a user is online. I have seen many ads in many apps I use in my android phone and never thought it could compromise my privacy. I wish to know what could b...
I was reading about the sybil attack and am unclear on some details. After becoming part of the peer-to-peer network, the adversary may then overhear communications or act maliciously. By masquerading and presenting multiple identities, the adversary can control the network substantially. To me some information...
Anonymity services/networks like Tor, VPNs that don't log etc., seem like very double edged swords. Is there any way to prevent people with bad intentions (like breaking the law) from using them or identifying them? After reading the wikipedia article of the Sybil attack notable Sybil attack (in conjunction with a tr...
Assume a server which offers some information which must not be exposed publicly. A client of this which may be e.g. a windows service (or at least something executing headless) needs to access the information on the first server. So the client needs to trust that he is talking to the correct server and the server need...
I don't use captcha for image upload form because I know that upload box value cannot fill automatically, needs to be filled by user manually. Are there any ways that somebody automatically post huge amount of image with some kind of script?
I want to know what are the points to be kept in mind while creating a hash token for my password reset links. In particular, how to make it un-predictable for an attacker?
The other day I was talking with a service provider (MSSP) who has experience with operating SOC (security operations centre) 24x7. Their price was rather steep (in the millions range). I don't understand why it would be so steep. My impression of a SOC is: getting a log collector such as HP ArcSight implement IDS on ...
I have installed an app on iOS to connect to a well-known VPN service. The app requests installation of a profile onto iOS, which as far as I can see are a collection of 7 certificates - 5 of which are signing certificates. As a novice in this area who's sought to self-educate on the internet I may well have misunderst...
I'm coding my sliding expiration algorithm for Bearer tokens to mimic what's done by Microsoft on their FormsAuthentication logic, and reading their documentation they say (emphasis added) When the SlidingExpiration is set to true, the time interval during which the authentication cookie is valid is reset to the exp...
I am a beginner and I am trying to program a secure website to improve my skills and knowledge. I am under Linux and I am using LAMP with php. My website is similar to a social network so people will have their profiles, look at the others, upload files and so on. I have implemented SSL with a self-made certificate and...
I am trying to do a secure connection with openSSL between a client and a server that I wrote. When I try to select the cipher suite to use, I do SSL_CTX_set_cipher_list(ctx, ECDH-ECDSA-AES18-GCM-SHA256) and this both on the client and the server. But when I check with get_cipher_list, the cipher at priority level 0 i...
I'm looking at JSON Web Encryption (JWE) and am left a bit confused about why you would use AES key wrapping. The document even talks about using matching key algorithm strengths: Algorithms of matching strengths should be used together whenever possible. For instance, when AES Key Wrap is used with a given key size,...
My boss gave me a list of 8K users in csv format and asking me to create accounts for them. The list have users with gmail, hotmail, and organization email addresses. I am using MVC 5 and ASP.NET identity 2. As I am reading CSV file, I am creating the user, and generating a token for them as below: var userManager = n...
Recently, there is a website by Malaysia Airline got hacked and their main page has been defaced, below is a link to that article http://techcrunch.com/2015/01/25/malaysia-airlines-site-hacked-by-lizard-squad/ I want to know how did the hacker change the html file? Do they attack in the DNS server, and reroute the requ...
While perusing the contents of pcap files I've noticed some URLs appear to be visible despite being HTTPS. These mainly occur inside payloads that contain cert URLs too, but I also see HTTPS URLs inside what appear to be HTTP payloads. Can someone say conclusively whether HTTPS URLs are truly kept secret? I'm concerne...
If a web app and a database are on the same server, what is the security benefit of encrypting database data? Obviously passwords should be hashed either way. I assume that if an attacker can inject some SQL or server code he would be able to view database data. Could somebody more precisely outline the security imp...
If someone successfully set up a phishing website on a fake wireless network for say, bankofamerica.com, and lets pretend that SSL was not used, would they be able to run a script on the server that reads the cookie contents of anyone who connected to it (for example, a long-term authentication token)?
Lastpass stores the password databases encrypted on the server. Does it give a database to anyone who asks? If no, then what authentication (i.e. password) is used? I use Lastpass on multiple devices with the same master password and have not configured any other passwords. It sure would be silly if the master password...
I need to securely request and receive data from a server. The client has the RSA public key, and the server has the RSA private key. So I am generating a random key for AES-128/CBC cipher and encrypting my data using this cipher. The key is encrypted using RSA Public key and decrypted at server end, so both the client...
My dell laptop has been stolen and i want to know the mac address of the device to track it. the system is sync with google and windows 10 OS is installed.
How secure is the Windows screensaver password? Seeing that screen saver passwords are used in the corporate world, is there any way of bypassing the screen saver after it is already running? Could a CD/DVD/USB be inserted and a program ran to close the screen saver that bypasses the password?
Suppose I open a signed mail on 1st January 2000, signature is OK. What about this two cases : 1) If next CRL is to be published one week later, I found it strange that it is “probably” valid until next CRL, this mean that I should wait one week to “trust” the signature ? 2) I re-opened it on 31st January 2000, the ...
Is a Network Intrusion Detection System (NIDS) (pattern matching, protocol analysis or behavior analysis) able to detect buffer overflow in the network traffic?
When a PKCS12 file is imported into a Web browser or Windows store the user is prompted for private key password. How does the browser or operating system manage this password? Is it secure?
I'm currently building a MVP (financial mobile app) and trying to understand the best ways to prevent rogue clients interacting with the server. When looking at the security of most mobile apps I can see that it's fairly easy to do a MITM attack on these to intercept the communication over SSL. Some apps seem to preven...
I'm looking to implement a "Verify with Bitcoin-OTC" feature for my web app. The general idea is the user would prove he owns a particular account on the external site Bitcoin-OTC and my app would accept/deny him based on his rating there. Here's how I'm thinking of implementing this: User provides Bitcoin-OTC usernam...
I simply want to know if is this normal, abnormal, deceptive, illegal, etc... I am at work. When I bring up a certificate for most domains, I get a very standard certificate. When I bring one up for Facebook or Twitter (social media sites), the certificate throws a warning. The warning is because they are untrusted. Lo...
In my community, we have one state university that offers cyber security training once a year to high school students that show interest. Last year a student, after receiving this training, hacked his school. Should we be training high school students or focus more on education? Do you feel that a "all of the above" ...
Is it specifically something about SMS protocol, the proprietary software used to do message routing, or perhaps an ACL on the server? I would imagine that a gateway accepting emails from anywhere that were then sent via SMS would check the from field on any incoming message against RFC5322, but then again this is clea...
I have an IP address, and I want to find the corresponding MAC address. The IP address is in the same city, so we're connecting to the same network. How do I find the corresponding MAC address?
For cryptography, it is considered good practice to release the code so others can audit it...is this also true for penetration testing software?
I have read the RFC on this and can't seem to find what I am wanting to know. When implemented, if a client and a server support TLS fallback protection, does it only keep them from downgrading to SSLv3, or for example if the connection is made at TLS1.2, will it hold it there? Or will it allow it to fall back to 1.1 o...
For quite a while I've been experimentally hacking wireless routers by capturing handshakes and Decrypting them using oclHashcat on my computer. even the most complicated passwords won't take longer than 10 days with powerful GPUs available these days and also Wireless networks based on Radius server are so vulnerable ...
I have a text document with all my usernames and passwords in it sitting on my desktop. I decided to spend a couple hours making that more secure. I wrote a program for the purpose. It takes a password and a file, SHA-512s the password and adds each byte of it to the file in 64 byte chunks. It subtracts to decrypt. I r...
During the recently completed professional Starcraft tournament, Intel Extreme Masters (IEM) Taipei 2015, the notorious cheat software company Team Gamer Food hacked the cast somehow. How did they do it? I have included a screen shot below showing the hack: Just to give the background on this for people unfamiliar wit...
I have a website created using WordPress and used WooCommerce as the cart plugin. Recently I found it hacked, as it responded to an AJAX request with a HTML code, which should receive a JSON object as the response. As I check the source files, no files were replaced, but I found some unusual codes appended at the end i...
I have a SSH2 public key with a .PUB extension and when viewed in notepad it has this header: ---- BEGIN SSH2 PUBLIC KEY ---- How do I view the thumbprint of this key? I've attempted ssh-keygen -lf key.pub but that returns: "Is not a valid key file". (I got the binaries for ssh-keygen from github's standard shell. I...
My server was hacked with some files being overwritten to generate spam links on the index page. All my previous backups contain the same modified files, making the nuking from orbit option a puke. If the server root has not been compromised, I intend to just clear the infection and monitor further. What are the signs ...
I want to ensure they're not downloading any illegal content (torrent websites in particular). If they're using a VPN or Tor, then I guess there's not much I can do, but if they're just connecting directly to, say, pirate bay, without masking their traffic and downloading content through them, is there a way for me to ...
If there is a way to bypass the built-in functions of PHP to protect against SQL injection or I should rely on some other filters rather than depending on built-in functions?
Let's say that the website example.com has CSRF protection. They send a CSRF token in a custom header and in hidden input fields. For example to add a new folder, your http request needs to contain CSRF token. What I've observed is that if you make the same request, with CSRF token but withou a session cookie it still ...
Most people go on browsing the web while connected to their facebook/gmail/etc. accounts. Other websites somehow know what accounts you're logged in. For example, if you go to hide.me's torrent page, it will tell you what logins of yours were detected, even though you never (explicitly) approved this website to access ...
I understand how it is able to create a secure connection via the handshake, but how is it able to initiate a secure connection without first sending an unencrypted request, thus revealing the destination website (but not the data sent or received from/to the destination...) to a potential "man in the middle" attacker...
Is it possible to perform secure keyboard entry (similar to what is offered in the OS X Terminal app) using only web technologies and/or Flash? If not, is there any way to more broadly guarantee exclusive/isolated access to input devices, or to check whether or not a device has been read or manipulated by external proc...
I have heard that I should (A) use one URL for all "pages" on my site, such that what page is shown is determined by the session state, and (B) don't use an extension like .php. One curious fellow even claimed (C) in a talk that people should not return 200 codes but should use randomly chosen codes. I guess I underst...
The college that I'm currently attending (masters) offers a ethical hacking course, which I am currently enrolled in. I have been seriously considering dropping the course for several reasons. 1) The course until now has dealt with fluffier topics such as how to think like a hacker etc. and frameworks and specificat...
What is the best way to analyze requests sent by a mobile application over SSL? The communication protocol is not necessarily HTTP/S so intercepting them with BURP/ZAP/Fiddler or any other HTTP proxy will not necessarily work, but - How do I get the traffic to even reach the proxy? I've read some material here relatin...
I have a Facebook account which I look at occasionaly and access via the Facebook app. However whilst reading my emails I tried to access it from n email had they had sent me. I clicked the link which opened up the Facebook log in page. The boxs were complete already so I loged in, but it was somebody else's account. I...
What encoding is the modulus in RSA cryptography stored as in a .pem file? Is it something similar to base64 of the modulus? I can retrieve the modulus using the following: openssl rsa -in pubkey.pem -pubin -modulus But what does it actually do? If I have the product of two prime numbers(n) in decimal form then how sh...
I have a public key/private key pair i generated using two primes p and q. I now need to use openssl to sign and create the certificate. I heard req utility and wrote this from the man pages. openssl req -x509 -days 365 -nodes -key inputfile.txt -keyout key.pem -out cert.pem But what details should I specify in inputf...
I plan to create an encryption program for an embedded device with the following characteristics: CPU is Intel 80186 compatible @ ~20 MHz 128 KB RAM, of which I have ~20 KB at my disposal for purposes of encryption application binary size limited to 128 KB, but I'd like to keep the encryption part < 16 KB persistent s...
I manage a website that is a "bad magnet" for our competitors. I am using Incapsula CDN + WAF and I have internal proxy for caching. CMS/WP from its nature is very data consuming, I have check that, and on every page there can be more than 80 queries to the mysql just to render a single page that is not cached. The ...
I have been seeing persistent SSH connection attempts on my computer from a familiar IP address. I got curious and decided to do some Googling on the IP address. Turns out that someone from Indonesia is publicly sharing a whole list of IP addresses of servers, some from Digital Ocean, with their SSH passwords. I am not...
The point of steganography is to hide useful messages in other messages so that no one suspects the message to contain secrets and tries to crack the message. The catch is that the recipient should know what that such a message is to be expected and how to decrypt it (find the hidden message). Steganography helps prote...
I've setup an SSH server on my Raspberry Pi. I use RSA keys to login, I disabled root login, password authentication and I use port forwarding to login from outside my network. I can see the connection logs from the file /var/log/auth.log but I noticed that it is cleared on regular basis (I think some days) and can be...
I've started a course about Penetration testing and CEH on cybrary. The course begins with an introduction that quickly describes each step of pentesting. The first step is essentially to gather information. So that's my question, what I can do if I can't get any (or only irrelevant) information about my target? What c...
Please could anybody explain to me how certificates are used with digital signatures? I understand difference between certificates and signatures. It is clear. Digital certificates are used to verify the trustworthiness of a website, while digital signatures are used to verify the trustworthiness of information. ...
I was reading up on why TCP ISNs need to be randomized, which led me to this write up by Tsutomu Shimomura. I understood how IP address spoofing and predicting the ISN helped the attacker establish a one way connection to the 'x-terminal'. But after that the attacker sends this data - rsh x-terminal "echo + + >>/.rhost...
I know how to create payloads using Metasploit and then script a AutoRun script, so when the victim machine connects back to my Kali Server it execute some actions. Works sweet! What I wanted to do is create a payload weaponized with actions (Create process, change firewall rules, check VM, etc...) so I can run actions...
To be specific the main problem is that I want to detect if the caller ID of the incoming cal I get is real or spoofed? Most VoIP servers now allow their clients to use any caller ID they want. Also, before the caller hears the ring no authentication is made by the operator (for example, Vodafone or O2) to check if the...
It seems that many servers know that I use VPN. They either block me completely or make me answer CAPTCHA etc. I want to use VPN but seems that many hosts don't want their customers to use VPN. How do they know that I use VPN? And how could I use VPN without people knowing about it?
I highlighted my question below. Here is some background. It's easy to find data showing the most commonly trojaned/modified Linux binaries and config files. ps, ls, find, kill, lsof, passwd, shadow, syslog.conf, etc. are all frequently changed after a system has been compromised. It's also easy to monitor utmp and wt...
I wrote this on LinkedIn - Discrete Discretion My first question is: Is it accurate to say that default encryption is a placebo? Will default encryption only make end-users think they are secure instead of actually making them more secure?
As a SaaS hosting, we are considering allowing customer to use an alternative domain to access his SaaS environment. Default domain owned and hosted by us: customersubdomain.ourdomain.com Additionally we could add bindings for any domain to the same site, allowing an alternative domain, not owned by us: www.customerdo...
When doing a web vulnerability assessment with tools such as Acunetix and w3af, is it worth it to install the same web application on multiple types of web servers (Apache, IIS, etc.)? If differences could be found, in the scanning results, between the different web servers, what type of different vulnerabilities could...
I am only indirectly familiar with denyhosts (and only just discovered fail2ban) and they certainly seem like worthwhile tools. However, after looking through the options for sshd_config I am trying to determine if there may be some similar functionality within sshd itself. In particular, MaxAuthTries seems relevant. ...
I am reading another answer on this website. It says: Assume you are logged into Facebook and visit a malicious website in another browser tab. Without the same origin policy JavaScript on that website could do anything to your Facebook account that you are allowed to do. For example read private messages, post ...
Different operating systems use different file types and file systems. Does it make a difference to a virus scan which system it is being run on and what type of malware it's looking for? I ask because the way the files are archived may be different, for example Android's apk is in an archive so would a program like Wi...
I am trying to understand what use cases exist for the use of Same Origin Policy (SOP). SOP prevents a document or script loaded from one origin to interact with a resource from another origin. But in what scenarios is this really used? From this answer, if I include scripts from different websites in my webpage, the s...