instruction
stringlengths
24
27.2k
im using HMACSHA256 to generate the hash of password and store it. the objective here is to just authenticate users, i.e - save their hashed passwords, and validate users whenever needed using the hashed passwords // salt is a guid we store seperately, its the id of the user byte[] GetHash(byte[] password, byte[] salt)...
I'm interesting in exploring possibility to authenticate user using their Digital Certificate. The methodology is to first register the DSC from the user and keep their Public key along with Serial No. and Name etc. Later when user selects the same DSC at login page then encrypt some data from their private key and tr...
I have access to a server that I use for backups. I use rsync with the --delete flag to make an exact copy of my backup directory. I have no need for incremental backups. The backup directory on the server is encrypted with ecryptfs (although not the whole home folder). I have written a script which is stored locally a...
I am working on website,where I want include csrf checks by using referrer checks,will this be sufficient way to protect the form from csrf attack? if not what an attacker can do to bypass it?
Take for example 1Password, that now can store your password and one time password secret in a single place (your 1Password vault). I know it isn't truly two-factor anymore, but how much better is it compared to single factor authentication? To be more clear, say I have a Dropbox account with two factor authentication ...
If I need a bodyguard I'll have to hire someone whose muscles are much tougher than mine. If a server can't handle a DoS/DDoS attack because it consumes it's resources does this mean the firewall has to have better resources than the server it protects? ie bigger RAM, better processor and of course this means the firew...
I have done some searching, and cannot seem to find this. Does anyone know of a "security fail forum" that lists embarrassing and / or damaging results from lack of security practices? I would like it to serve to educate everyone on how important computer security really is, kind of like the drunk driving horrors vid...
I'm a little rusty on cryptography, but I have successfully acquired a 256 bit key that is used for encryption and I want to know if it is possible to reverse it into its corresponding plain text password. If yes, how do I do that?
I have a mobile application (ioS) which only certain users are allowed to use, and its coded in such a way that they could only login using secured VPN (with tokens) in order to access our internal network servers for data retrieval. My auditor request that, according to good practices, all mobile apps development sho...
If I understand the topic of digital signatures correctly, you sign a message via hashing+encrypting it using your private key. Then, if a private key is compromised by an attacker, she could sign stuff pretending she's you. This way, any organization that has the (even legal) power of asking you to decrypt your messag...
There are many questions surrounding the differences between symmetric and asymmetric encryption keys. I think I've read them all at this point. But I'm still left wondering: Why does a "secure" symmetric key only have to be (roughly) 256 bits, while asymmetric keys must be at least 2048 bits long to be considered "s...
I have a hardware device that can compute ECDSA signatures and generate ECDSA keys without exporting the private key (only public key is exported). I'm looking for a way to tie this into SSH. Is there a way to do so without patching OpenSSH?
I am a app developer and working with another software group at my MEGACOMPANY. Said group wants to put confidential information on the internet and they are very happy with their authentication system which just blocks that content from our normal customers based on IP address. I have already cracked their system yet...
I'd like to block all users from inside Company X from visiting my website. However I don't work at Company X. Is there an efficient way to learn what the IP is when people inside Company X access the outside world? For instance, are there logs around the Internet that might be searchable? Note that I don't care if the...
I mean a javascript api for capturing a renderered html page, or current viewport, and dump content onto an image. While there are obvious attacks, such as taking screenshot of sensitive information, I don't really believe a screenshot api is more evil than, say, being able to log your key strokes with javascript (whic...
I have a general encryption question. I have read through many of the encryption related questions here and I can't find any specifically addressing my concern. This is the hypothetical scenario: I am storing credit card numbers in a database The numbers are either encrypted or hashed A public facing application check...
We have a database of sort codes (6 digit numbers) and account numbers (8 digit numbers) that we use to reconcile monthly accounts with the table of supporters. There is nothing in the data received from the bank that uniquely identifies the supporter, other than the sort code and account number. ... I know, it's annoy...
This blog post describes a method for preventing session fixation attacks (in ASP.Net in particular). The idea is that the session id should be tied to the user's identity in a verifiable way, which means that a given session id can't be valid for both the attacker and the victim. Their construction uses: select rand...
Some computers on my university block the keepass application which I use as a password manager. I'm thinking of building a small web application + Android app which lets me securely copy a string from my phone to my computer. Since more people will have this problem, I'd like both the web application as the app to be ...
In elliptic curve cryptography what should be the length of session key? Is there a specific metric to choose one, or are they randomly generated? I was studying one paper about defence against a Sybil attack. In the initial deployment stage of a vehicular ad-hoc network based on roadside unit support they used 16 byte...
I'd like to mitigate DDOS attacks, for an Azure vm server (just TCP ports 80 and 443). Azure appears to be a great solution. I can't find any Azure documentation, as to if there is an Azure firewall, which I can configure, in front of my Azure vm server. For example, if there is a 10 Gigabit/second UDP attack, I don'...
As far as I understood rpcbind is used for listing active services, and telling the requesting client where to send the RPC request. If a host listens on port 111, one can use rpcinfo to get program numbers and ports and services running; For example look at below: root@bt:~# rpcinfo -p x.x.x.x program vers proto...
I've just taken over as IT Manager in an environment where most of the end-users are using HP-based Win7 thin clients (approx 50 seats) to access a remote desktop server. All the servers & fat clients on site are protected with ESET Endpoint Antivirus, however I notice none of the thin clients have any type of AV enabl...
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...