instruction
stringlengths
24
29.9k
Since Apple force iPhone users to use iCloud to sync contacts & calendar, I moved to a local ownCloud instance that works well. However, it would be more convenient if I could sync everywhere and not only when my local webserver is started (and thus I'm near my laptop), so I'm thinking of a simple VPS with ownCloud ins...
I am a QA Engineer, but have been tasked with creating a security testing platform. I have many years with Backtrack/Kali and my primary OS are Arch and Ubuntu. The Systems guys here gave me a CentOS machine in the cloud to build out a machine that will be the hub for all of our security tests. Both systems level tests...
Let's say that we're building a generic timing-safe comparison function for general purpose use. Making it so that it is safe when both strings are equal length is pretty well known. However, what I'm not sure about is how we can make it safe if the strings are different lengths (arbitrary). One string will be deemed a...
Some time ago, penetration testing was done on our website, and one of the tools used was SQLMap It was executed by a security consultancy, but unfortunately they did not notify us beforehand. So, seeing that they were in the middle of enumerating the tables in our database, we treated it as a genuine penetration and ...
In OWASP recommendations regarding escaping untrusted input for HTML element content, they list the following: & --> &amp; < --> &lt; > --> &gt; " --> &quot; ' --> &#x27; &apos; not recommended because its not in the HTML spec (See: section 24.4.1) &apos; is in the XML and XHTML specs. / --> &#x2F; forward slash is i...
I'm following a tutorial to write a simple buffer overflow. I have (basic) knowledge of assembly, and the stack. I've written a stack based buffer overflow before and understood it. The program I'm exploiting this time has NX enabled which means it's not possible to execute code from the stack or an environment variabl...
I have a pool of cloud servers (~50) that need to talk to many other remote cloud servers (~4000) using SSH. Each remote server has its own SSH key, so we need a place to store all of these remote servers' SSH keys securely. How should we go about storing these keys without saving them all over? What is the best way to...
I am currently developing a component for an application that does TCP communication with a device inside a local area network. I use TLS to provide data encryption, integration and authorisation. However, I have to use self signed certificates which will not expire in like 5 years or more. Since using self-signed cert...
So, i learned that new in PHP 5.5 is password-hash() which works much like crypt(). Which is more secure (slower) than md5() or sha1(). The result string is algo+hash+salt, which can be passed as-is to password-verify() to verify password. So far i get how it works. Some doomsday questions that remain: Q1) What is the ...
Apologies for the funny title, I'll try to give a better explanation here :) I have just noticed something weird with regards to a website certificate: if I go to https://www.anobii.com/login using Firefox on my PC everything works and the certificate is validated. If I visit the website on my phone, using Dolphin Brow...
On a large project, my company is responsible of administering the internal servers where applications used within the intranet are installed. One of our sites are accessible from outside but we do not manage such redirection, another company is tasked to manage the network. Every seat has a laptop running W7 with no r...
Among the Elliptic Curve Cryptography (ECC) algorithms available in OpenSSH (ECDH, ECDSA, Ed25519, Curve25519), which offers the best level of security, and (ideally) why?
In ~/.ssh/id_rsa.pub my public key is stored as: ssh-rsa magicmagicmagicmagic...magicmagic username@hostname When publishing my public key, should I include the username@hostname bit? Can I replace it with something else? My concerns are that: I may want to change the label for vanity purposes (super@wishihadbetterh...
I know being an employee I am paid to do what my boss tells me to do, however: I am currently writing a website for my company that I work for. We work with sensitive data, so much so that my line manager told me that the overall boss wants me to lock IP addresses to accounts so that you cannot access it unless you are...
I tried to find any documentation about the security of LINE messenger, but I couldn't. Is there any documentation or reviews about the communication protocol it uses, and whether or not it uses end-to-end or point-to-point or no encryption?
I am looking for a password application for storing passwords, and RatticDB have a web interface and SSH access is planned, which are exactly the features I am looking for. However, they write that they don't encrypt the database. When designing RatticDB we made some very specific design decisions. We didn't include...
Is it possible to detect IP spoofing/reflection attack via NetFlow?
Is it possible that somebody who has access to my laptop can flash a new version of bios which does spying too i.e. recording keylogs, url browsed, downloaded files etc and send it to remote location and i will not even come to know about it ? I am running ubuntu 13.10 on dell inspiron.
I've tried to reproduce a string comparison timing oracle in two languages (Java and Python), but I'm not seeing any correlation in the timing based on the input into the comparison. Are there any examples out there, or do you see an issue with my code? Note that I would like something simple, like the example I have...
A friend of mine lives in Hong Kong and she travelled to China over the weekend. Whilst there, she was able to use Gmail on her Android phone without logging in again, but she had to re-login on her laptop to use her account (she didn't end up using it on her laptop). Something very strange happened while she was the...
Are there location tracker hardware (GPS receiver) which can be fitted inside of a laptop and it sends live location data to a remote location ? If yes, how to detect such trackers ?
The oft-mentioned approach for website password-handling is to use a server-side language to employ a suitable hashing algorithm (stretched or otherwise designed to overly-consume computing resources), combine with a randomised salt, and voila: a safely stored password. I'm over-simplifying, of course. Whilst this stop...
After constantly being under attack in phpBB, I created a new forum by hand, which successfully prevents spam bots from registering, and I get a report for every failed login attempt, telling me the info they tried, their IP address, whether they're blacklisted, etc. Of those that are from spam bots, the login info I s...
I have an ASP.Net MVC 4 web application that is hosted on a Windows 2008 server. The application is secured by a custom ASP.Net membership provider. Only users who are granted permission by the admin have access. The application contains sensitive medical data of individuals. Recently, I discovered that 60 out of 320 r...
I have file uploaded system in my php project. What I make at uploading: 1) Check file extension and file mime type. 2) If extension and mime type are allowed types, I save file outside of public_html directory and then, I give the opportunity to users, download file so: if (file_exists($file_path)) { header('...
So I have a Ubuntu server hosting a PHP-based web site for me. Some of the services rely on sendmail being configured. I have set it up to send through my GMail account. As of yesterday ~19:00 CET, my GMail "sent mail" folder suddenly got overwhelmed with Returned mail delivery reports from Mail Delivery Subsystem. I ...
I have a string of 7 characters. I'm supposed to generate all the combinations. But some combinations are more likely than others, I would like the more likely ones to be generated first. If I iterate from AAAAAAA to ZZZZZZZ, it's very unlikely that AAAAAAA is a valid combination. But BZYEKSO would be more likely being...
I need to encrypt byte arrays blobs fields of approx 50k to 100k each in .net with a public key then store in SQL/Server thendestroy original data. When the data is retrieved by the ultimate owner, it would be with a key that only they have (I don't). The problem is that I need all records to be encrypted with the sam...
After reading the recent social engineering of a user's twitter handle, I started thinking about ways to improve my own online security. We can only do so much too protect ourselves because at the end of the day we have to trust the companies whose services we use to do their part in protecting us. Nevertheless, I'm c...
As described in Perfecting the Art of Sensible Nonsense, a major breakthrough in cryptography research was published in the summer of 2013: Candidate Indistinguishability Obfuscation and Functional Encryption for all circuits In principle it seems to allow for what most computer scientists had assumed was impossible:...
The PCI DSS says that a server can have only one primary function and i'm a little confused over what it means by 'one primary function' we have a webserver with database - web pages and email is this a breach of the rules? because just about all web servers come with a database, web server and email. We are only a ver...
There are more and more sites claiming that long passwords which are chained words are not only easier to remember, but also more secure then short but obscure ones. Don't get me wrong: I totally get the idea of entropy, but are actual bruteforce-attacks really that stupid? With Markov-Chains and dictionaries isn't tha...
My boss is asking me to prepare the fire incident Plan(IR) and Disaster recovery plan(DR), and how can we determine it is IR / DR. I am no clue on those issue. What should I do?
I've been reading the posts here about bypassing ASLR. On 32bit systems this appears to be trivial but I was surprised to see how trivial. It takes mere seconds to bruteforce ASLR address'. The reason seems to be that according to my tests only 12 bits actually change in the address: export BLAH=$"/bin/sh" BLAH will b...
While symm. crypt. has around 256 bits of a key, why does public key crypt have a key that is much longer (1000's) ???
My web server is chrooted into /var/www, and its contents are available over the network. One of my web applications needs access to a unix socket, and so that socket needs to be somewhere in /var/www to be accessible by the server. Does it pose any security risk creating the socket in a web accessible directory?
I’m working on windows desktop application which is created using C++ (IDE : Qt creator). It has login panel, where i do user validation via https connection using openssl 1.0 library. Application is working in most of the machines, but i'm also experiencing "SSL Handshake failed" error while making https connection fr...
How can I see all code signing signatures an executable has? I know that requests for a tool are usually considered as opinion based, but I really can't find one and I don't expect many answers. Background: I have an executable that was signed by the vendor (for UAC purposes). The application was then tested by me and ...
I'm responsible to create new accounts for some services on my job. Some of these service do not allow password change by the user, so in the case the user wants to change its password, he would need to tell me it or I should change it and tell him. In any case, the password has to be send. So far I've been using email...
Yesterday I got a cable modem, and on the back of the modem there is a small sticker with the name of the default SSID, which looks like Vendor-A11 and the default Pre-Shared Key, which is a long password containing both numbers and letters. I found it convenient that when I want to connect some device to its Wifi, I j...
Is it possible to extract userid from GPG public key? I got public key only and want to know to whom it might belong. I find one possible workaround — to publish this information on keyserver — it decodes information and reveals it to public. But I'm not sure, I should do this. Is it possible to extract userid using co...
i'm wondering how safe it is to use createHTMLDocument to do HTML sanitization. I've tried to implement it like this: function sanitize(string) { var elm = document.implementation.createHTMLDocument().body; elm.innerHTML = string; // traverse and filter elm to only allow whitelisted elements and attributes // e...
I'm writing some security software, and don't want anyone to be able to intercept data as its passed from client->server, and server->client. The best way to do this is over HTTPS via SSL. However, I've read that you can't trust HTTPS, as Certificate Authorities can get hacked, or taken over by Governments. I've also ...
I'm writing some security software, and don't want anyone to be able to intercept data as its passed from client->server, and server->client. The best way to do this is over HTTPS via SSL. However, I've read that you can't trust HTTPS, as Certificate Authorities can get hacked, or taken over by Governments. I've also...
I am working on a java program and I am now working on its network security. I want to use a secure connection since it transfers a lot of sensitive information. On all security guides it is mentioned to always go with a standard way and dont use your own encryption/way. Are there any security issues if I use my own pu...
I'm a security newbie. I'm implementing oauth on my site and I want to ask where I should save my access token: cookies session (will be fetch from the server via ajax request) I have backend (restful) and frontend (SPA). Communication only between them. By the way what is recommended expire time for oauth?
I need to select a project for this semester. I'm a second year uni student in Ethical Hacking and Countermeasures. My idea was to see if using some kind of pattern based password cracking can be more efficient than standard brute forcing or dictionary attacks. By pattern-based cracking I mean something like: CvvcDcv ...
Ok, so I am coming into this a little blind on how to go about allowing this app to store and check one's driver's license ID against the DMV or some other government agency. Basically, everything will be stored locally on the App, but then there needs to be a verification process either through using a PHP script to c...
This question covers the risks of accepting Binary blobs in one's distribution. This may be a very paranoid conspiracy question. But considering all the topics regarding the NSA in 2013 one cannot help thinking that the binary blobs in the Linux kernel could contain explicit security holes. Where most of the blobs con...
I have an app server hosting a CakePHP app and a database server hosting the databases. The servers are physically separate. The databases contain encrypted sensitive information. The encryption keys for the encrypted data are also stored in the database (which are themselves encrypted). The keys are decrypted by the...
So, our database is using bcrypt with a high iteration/cost to store our users passwords. We're using https like intelligent people and we continue to work on finding ways to sidestep our own security before someone else does. With that said, we are beginning a new marketing push with a new interface and the marketing ...
If you don't want to read all of the details, skip to the bottom; I'll make a summary. I created a computer program as a proof of concept (I threw it together in 12 hours, so I wrote it in Visual Basic to get it done quickly). Normally I'd be using Linux but my client wanted a Windows version, so I resorted to VB. Anyw...
When I visit livescore.com, ten seconds later I receive marketing emails from gambling companies. If I don't visit this site, I don't receive these emails. Similar things happen when I visit Twitter or Tumblr. I receive emails advertising their sites, even though I don't have Twitter or Tumblr accounts. How do they kn...
I have been encountering more and more clients needing their API (usually REST) endpoints tested for vulnerabilities and wanted to reach out to see if anyone has some recommendations beyond what I have been doing. I am very familiar with the REST security cheat sheet from OWASP and have built a number of API's myself...
I was recently reading about the attacks on SSL/TLS that CRIME and BEAST were able to exploit by attacking the compression in the secure session. Upon reading this I remembered that OpenVPN has compression as an option in the VPN server configuration. I was wondering if the same sort of attack on TLS could be used agai...
I say that if a professional code breaker has a bunch of data, the encoded version of said data and the encoding method he can figure out the encoding key. It is just a matter of having enough data. Is this true? How much data or how many characters (with matching coded characters) would a professional need in order t...
This question is about SNORT- I m basically trying to detect PING FLOOD attack. I have included the rule**(drop icmp any any -> any any (itype:8; threshold, track by_src, count 20, seconds; msg:"Ping flood attack detected"; sid:100121))** for that in the ddos.rule file of snort. Attacking using the comm...
(Sorry if this isn't in the right SE / is not relevant for security.stackexchange - seemed like the best choice) Is there a way for two anonymous parties to establish that they are not previously known to each other, before revealing their identities? Suppose that Alice and Bob are able to communicate anonymously and w...
I have a web service which is used by a Flash client. Both the service and the Flash client is produced by me (read: my company). The Flash client communicates with the server over HTTPS. One of the issues we have seen lately is that people decompile the Flash client and then create their own clients to interact with t...
If an attacker knows my database username and password, what can he possibly do if he doesn't have access to my server? Let's say my database is using Microsoft SQL Server. Is there a way he can use those credentials to manipulate my database?
I am developing an Android app that will potentially handle sensitive user data, and some of it may be even considered medical data (for example user height, weight, alergies, etc). What would be the recommended security practices to protect the user's data both from the client-side perspective as well as the server-si...
In the early days we happily saved whatever password a person wanted to the database. Later we decided that passwords must include certain characteristics like numbers, upper and lower case and defined lengths (sometimes a max of 8; yikes!). Not too long after that some of us decided that certain characters like ; and ...
Situation: Consider the site: example.com, hosted at web server A. A WordPress blog is to be installed on a different web server, B. In order to route a WordPress installation to a subdirectory on the main site, e.g. example.com/blog/, most suggestions on StackOverflow recommend to use the Apache mod_proxy module, to ...
UPDATE: My questions and concerns below boil down to: "Should I reject obviously poor passwords like 'hellomydarling' or 'password'? My guess is yes and I want to know to what extent. I'm using a password strength estimator to assist with that. I have been doing research regarding usability verses security when it com...
I need freeware tool for source code review for my application which used WebSphere Portal and Java as technology. Please provide me relevant information or links regarding this.
I'm wondering if to prevent the possibility of a compromised SSL certificate leading to the potential for sensitive information disclosure if it might be prudent to further encrypt data being passed over SSL. Imaginary scenario: two web applications. One is a web application, the other is an application supplying an au...
Can you give me an example of a short data string that, when decompressed using Zlib's DEFLATE method, expands to something much much longer? More precisely: what is the nastiest decompression bomb that one can build for Zlib's DEFLATE? The figure of merit here is the compression ratio. If the compressed file is n by...
In rules configuration of snort I have: alert tcp any any -> any any (msg:"HTTP Connection"; react:block;) However when I add: alert icmp any any -> any any (msg:"HTTP Connection"; react:block;) it gives me a error that react is not allowed for ICMP. Is there any other way to enable this? How can I block packets in ...
I quote from this article Forget about hacking – your servers might get stolen: Are data centers as secure as they want you to think? Though security is often a selling-point for many data centers, they aren’t necessarily safe from theft. There have been plenty of incidents involving hardware theft from data cente...
Can you run Side-Channel-Attacks against a PC which was found properly shutdown and powered off? The attacker knows the cryto-tools used to encrypt the data. The attacker has full and unlimited physical access to the whole system. The system is not infected with any malware. The user who knows the passwords will not in...
Suppose i have not written rule for a type of attack in SNORT; It is obvious that it wont show any alerts. I wanna develop a system wherein i capture packets that SNORT allows n do further processing on those packets to detect if those belonged to an attack or not! So, how to i log packets which snort considers to be g...
In the context of Key Management and encryption/decryption, what does "Deleting a Key" mean exactly? What are the implications of "Key Deletion", in terms of: Decryption of the old data (i.e. data encrypted already using this Key) Re-using the Key by creating it again (either accidentally or on-purpose) Storage of the...
I own a url shortening service. I want to deliver only legitimate statistics to my clients. There are possible scenarios that a particular user writes a script to automatically open the shortened URL, thus making the statistics look bad. What are the approaches one can follow to detect if a click is legitimate or not? ...
Given that control characters are usually not rendered, but they are given a special meaning in most terminals, what reasons are there for terminal apps to continue to support copy-pasting of control characters? One can mask a harmful code as described here for example, so that it causes issues when pasted into a termi...
I am trying to make provision for resetting password if the user forgets his password. What I did is make a html page(say email.html) where the user will enter his email address. When the user submits his email address the webpage forwards it to a servlet, lets call it forgot_pass.java. Then a unique 128bit alpha numer...
I'm exploiting a blind SQL injection point, which takes a variable as username then check if the username exists in a table. (It's running MySQL 5.X with PHP) So I'm using this to retrieve all databases: valid_user_name' and ( SELECT substr(hex(schema_name), 8, 1) FROM information_schema.schemata WHERE sc...
Let's say I want to hash some data, using SHA256, in order to prove I know something. Maybe it's my secret ID for something. In the real of passwords we have moved from hashing -> hashing+salt -> cpu hard problems -> cpu+memory hard problems. However, the main reason we did all this is because passwords are (in the act...
Is it bad security practice to have a password that will allow you to access any user account on a website for support purposes? The password would be stored in a secure manner and would be super complex. Huge mistake?
If someone hides their DNS traffic by encrypting it with a service such as OpenDNS's DNSCrypt, would you still be able to see which URLs they're viewing? Also, if that person uses HTTPS 100% of the time, can you tell which pages they access? Or would sniffing their packets show which pages and sites they were accessing...
I'm looking at setting up an encrypted container with TrueCrypt (surprise) but I'm not sure whether I should use multiple files or if a large file would make any difference. Does the file size or number of files matter beyond the fact that you would for example need a larger file or have access to all the key files?
The question is clear, I'm a programmer and wrote a software to disinfect the USB devices when they got the malware which hides the files and creates a shortcut of the virus . Using this soft we can disinfect the data, But if the USB is replugged it'll get infected again ... at this point I'm trying to prevent malwares...
An annoyance of mine is when websites try to force me to use characters or a password policy that makes it difficult for me to remember (e.g. a number, lower-case, upper-case, special char, 5 - 10 characters)... What would the pitfalls be of simply having a password strength calculator and only allow passwords that are...
I am working on an android project for school and I am supposed to do a DHKE(Diffie Hellman Key Exchange). Everything works well, the problem is that it takes a lot of time (really a lot) to generate DHParameters. Basically, in my code, this is the part that is the most time (and battery) consuming: KeyPairGenerator kp...
I'm using several cloude storage services, like Dropbox. Each have windows app for its synchronization, and this app actually can read anything from my disc, not just files from its 'synchronized' folder. I want to make sure that this apps never access any other folder except sync folder. Is there a way to do so (using...
I'd like to limit access to some of my REST api, such that only bidirectional SSL/TLS connections are accepted, where the "other side" matches a detailed, restricted, whitelist. Is this something that's easily supported by the microsoft stack, as part of their MVC implementation - and, if it is, is there an example of ...
I understand that it is bad practice to add passwords and secret tokens to source control, with obvious implications arising if you are working on an open-source or related project. Rather, you should store them as environment variables. However, is it legitimate to add an encrypted private PEM key file to source cont...
As i saw most of the internet is being load balanced even at DNS . And DNS load balancers takes decision on behalf of client's DNS . So I Am just curious to know if i will use 8.8.8.8 as nameserver in my ubuntu 12.04 box then what will be my location for the internet. Will my ISP's provided dns not be of any use. And M...
The only reason I use BitTorrent is to download Linux distros, Open source apps and large documentation files. My ISP contacted me once and warned me: Ok, you aren't downloading anything illegal or pirated, but our network traffic doesn't allow p2p in general (implying that I should stop). So, I chose a VPN and tunne...
Actually, I'd like to ask 3 questions. But since they are very related, I'll ask them all here. I use Ubuntu 12.04.4. Situation 1: I use Terminator, in one of its terminals I launch sudo iotop (because it doesn't work without root access). Question is: can a malware gain root privileges via a process that is run with u...
This may sound stupid for everyone who knows more than me about the UNIX-System and security in software: Imagine you have a program trying to cause harm by deleting files. You just do something like "rm -rf /home/" and get an error message, because rm checks whether you are allowed to delete this directory or not and ...
I am not sure if this is the best place to post this type of question. I have come up with function which, I believe, is a very secure method of hashing. (I could be completely wrong). Here's the code: function hashPW($password){ $letters = array('a','b','c','d','e','f','g'); $numbers = array(1,2,3,4,5,6,7); ...
As far as I understand there are two approaches to perform CSRF protection: 1) CSRF token per session - the token is generated once per session. This is the easiest way; 2) CSRF token per request - the new token is generated on each request, and the old one becomes invalid. This is more secure but the webapp might be b...
When I record the network tab in Chrome Developer Tools when logging in to my site I find that the username and password are stored in plaintext under form data. You can also find it in Safari, Firefox and Opera too. I tried logging in to various sites like Google, The Verge and Reddit and they all do the same thing as...
Consider the following scenario: 1. When user visits a webapp, server:     a) initialize the session;     b) generates CSRF token;     c) saves token to session;     d) saves token to client's cookie via Set-Cookie header. 2. On each POST request server compares cookie token (which comes automatically with Cookie heade...
A question for cryptography experts. Imagine we have a conceptual Notes.app: There are notes (title|content) stored as AES-256 encrypted strings Application has to present a list of all notes (titles) in a list on its main window Every title|content is encrypted with a key, generated from a password and a salt Let's i...
How would we detect and locate a rogue DHCP server on our local area network?
I have a PHP sheller file (like c99 file) but it's encoded with this functions: eval(gzinflate(base64_decode("7P3rehblahblah")) The clamav virus scan can't detect it. How can I detect a virus and sheller like that?
I have clients which are all browsers. All clients render just a single page application getting data from a Web API. The design of the API follows REST principles. I use token-based authentication without OAuth because I have no third parties for my API and I want to feel how security can hurt my brain ;-) The format ...
In private network (as in using a private IP address space) at a cloud provider, other customers have access to the same private network. I have secured the communication between many hosts and services with TLS provided by Stunnel. Background: Current Stunnel Configuration To simplify the current situation, let us ...
In other words, my (long version) question is: Are developers able to get away with, more using ASP.net than PHP in terms of writing secure code for their apps? I ask this because ASP.net has many built-in security mechanisms such as SQL injection prevention. PHP, as far as I know, does not, at least not in that sens...