instruction
stringlengths
24
27.2k
I was taught that an important step to securing a website (primarily with PHP) was to store all sensitive information such as database connection info, salt generation, etc. in a separate file(s)/Folder(s) and use .htaccess with something like deny from all to prevent access to that information, and otherwise unauthori...
Just want to ask some questions regarding on this strange experience while logging on my account on Facebook There are cases that I'm accidentally typing my password into the username box of the Facebook log-in page without knowing it. I'm gonna demonstrate a detailed sample scenario of logging in a Facebook account. I...
I am not a .NET developer and I am trying to understand how exactly does __ViewState protect against CSRF/XSRF attacks. I came across the following : security Stack exchange discussion on similar topic and OWASP Guide to CSRF Protection I am a little confused with how exactly is the CSRF protection happening here. I...
Is there a way to track the sender and the location via the email address only. The problem is somebody has created a similar sounding email id to send content to my official circle with a view to malign me. It is obvious as result I am now under silent investigation and hence do not have access to the email
I want to cover the possible cases of attacking. My application already has captcha and two-factor authentication, but how can I avoid a tiny attack without annoying my users? The possible cases that I'm thinking to cover are: Show captcha after 3 failed login attempts based on Session, but the problem is that some...
I was wondering if such practice would be safe: I have a table that stores encrypted notes Every note has a data field and a password field When a password is entered, i want to select all notes, encrypted with that password For this purpose, i need to safely store the password next to the data There can be many notes...
Suppose I'm hosting a web server and a separate box offsite that crunches data. The web server interacts with the worker using the worker's API over port 2888. What would be the design of a secure infrastructure be like? I was thinking to have just 2 firewalls: one in front of the web server with port 80 open to the p...
When I search in google for: "sensors" The two first results are: "Sensors" "Publications" If I click on these two lines (the second one for instance), I get to a defaced website (actually, there is an extra document.location() redirecting me to a Russian website). However, If I go directly to the webpage : http...
At our office we have a router on the table, and the powers that be want to lock it down by MAC address to stop people from plugging in cables for other computers i.e. intruders. Given that resetting the router to factory settings to bypass the password will wipe out all the configuration (it has to be manually entered...
It appears that the textbook version of Diffie-Hellman is susceptible to man in the middle attack and the use of digital signatures could prevent this attack from occurring. Digital signatures could be implemented during the Diffie-Hellman key exchange in the following way Alice has a pair of public/private key (SKa,...
A friend of mine told me about the following problem: She used to login on Facebook on a computer of her boyfriend. After they broke up she recognized that he was able to login to her account from his computer. Of course she then changed her password, but still he is able to login via any device (smartphone, computer, ...
I am a newbie to PHP and password hashing. I am following the instructions provided @ Safe Password Hashing to hash my user password before storing. My questions are: PHP recommends password_hash() method as a preferred secure way to hash. In case of a database breach won’t the hacker use password_verify() and identi...
I'm using Apache 2.4, with two certificates, one RSA signed by CACert, and one ECC self-signed. Neither of these certificates provide a path to a broswer-trusted root certificate. My question is this: When presented with two different certificates for a website, how does the browser decide which one to use?
I know how to do this with RSA keys (see this article: Determine if private key belongs to certificate?) however I do not know how to do this for ECDSA certificate / key pairs. With RSA keys, the modulus can be used for this. However I'm not sure what the "equivalent" is for ECDSA. Thanks!
While being fascinated by how it is possible to create hidden services with Tor, there's a few details around the address collision issue I can't seem to wrap my head around. Quote from Hidden Service Names on the Tor wiki (my emphasis): The output of SHA1 has a length of 160 bit. To make handling the URLs more conven...
I have a port forwarded and open in the firewall that I sometimes use to play games with friends over the internet. The game server doesn't run 24/7, only when I'm actually playing is something actually listening on this port. Are there issues with having this port open while nothing is listening? I know I can tell the...
I have a small web application. Because it is necessary to upload some files I check the file extensions with a whitelist (tgz, jpg, png, pdf, zip, rar, txt, gif, py, c, rb). In addition to that, I hash the filenames with md5 so e.g. when the user uploads the file exploit.php.jpg it is renamed to 526a8f9f3497b5a69bc45...
I have certain information on my drive that I don't want anyone (not even me ;) ) to gain access to. I read recently that Fedora only offers EAS 256 LUKS encryption. This just isn't secure enough for me. I want 256 or stronger for my entire drive. Now I'm confused because on this site: http://docs.fedoraproject.or...
I'm using php/mysqli queries such as this: $stmt = $con -> prepare("INSERT INTO `comments` (`uid`, `article_id`, `status`, `comment`) VALUES (?, ?, ?, ?)"); $stmt -> bind_param('iiis', $uid, $articleId, $status, $comment); $stmt -> execute(); Talking strictly SQL Injection (no buffer overflows from entering 20,000 c...
When I do PublicKey.getAlgorithm(), it only returns me RSA. Am looking for something to return Sha1RSA. Basically to identify if it is a sha1 or sha2 algorithm. Any help is appreciated. Thanks,
For research purpose, I want to launch a MitM attack on computers that are connected to my wireless network. I wonder what is the best way to do so. Notice that I control the router, and do not want to launch constantly attacks like ARP poisoning or something like this. I want to use my router and a dedicated computer ...
I have generated an SSH key on Ubuntu 10.04 with ssh-keygen -t rsa -C "example@example.com" and the key's random art image comes out mostly empty (modified slightly): +--[ RSA 2048]----+ | | | | | | | | | D | | s.J | | Bv....
Am I correct calling file with .p7b file extension saved as 'Cryptographic Message Syntax Standard - PKCS#7 Certificates (.P7B)' in Windows - a 'PKCS#7 certificate'? Or is it better called 'X.509 certificate saved in PKCS#7 format'? When would one choose one certificate format over another? Do these formats have any p...
I understand that IOS 8 data can be encrypted when the phone is locked, and decrypted for use when the phone is unlocked. But let's say the phone was unlocked (and thus the data is decrypted), and then immediately shut down (by, for instance, forcing a shutdown if the phone freezes). There will be no chance for the dat...
After a lot of reading the expert opinion on password hashing, I understand that scrypt (which is both memory hard and CPU intensive) is a good candidate for password hashing. But I saw the experts recommending a wait of at least 5 years until it is thoroughly peer reviewed and baked (chicken and egg problem ? :) ) In...
I'm researching OS hardening and it seems there are a variety of recommended configuration guides. I realize the different configuration providers supply different offerings per Operating System, but let's assume (for convenience) we're talking about Linux. Consider the following : CIS Benchmarks NSA Security Confi...
I have heard that when creating a CSR that if you want to validate an IP address that you should list the IP as a "DNS" name and not "IP Address". I have actually had to re-create CSR's like this to fix clients that won't connect and browser SSL warnings. At first I thought it was something limited to self signed SSL c...
Just wondering what Certificate Authority (CA) policy is nowadays on validating someone's internal IP address in a certificate? I have heard that some CA's used to do this but won't anymore.
I am working in a organisation where it has a structure of a parent company and a subsidiary. Both are individual domains without trust. I work for the subsidiary The requirement is that the subsidiary company should have access to a ticketing portal at the parent company. This application relies on the parent company'...
Live Ubuntu USB drives are used for the purposes of secure transactions e.g. banking, payments,etc in the absence of live CDs since the devices do not include CD or DVD-ROMs. Since there are regular patches being published and the USB drives have limited storage, what is the best way to ensure the applications being u...
This answer mentions Bayesian poisoning in passing and I've read the wikipedia page but don't feel I've fully grasped it. The first case, where a spammer sends a spam with a payload (link, malicious file, etc) and includes lots of non-spammy "safe" words seems obvious enough. The aim is to bring up the rating of that i...
In my Java application (which use StandardPBEStringEncryptor by jasypt), when I use the PBEWITHSHA256AND128BITAES-CBC-BC algorithm instead of something weaker such as PBEWithMD5AndDES, I get an exception saying I need to install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files. But, as far...
I'm interested in ROP in the context of Java. For now, I don't consider the native code of the Java virtual machine. Is return oriented programming applicable to pure Java code?
I have two system with fedora12 installed Host1 IP address - 10.1.0.1 Host2 IP address - 10.1.0.2 Then configured IPsec in both machines as below Host 1 config (/etc/ipsec-tools.conf) #Host 1 /etc/ipsec-tools.conf # Flush the SAD(security association db) and SPD(security policy db) to remove previous entries flush; ...
I want to open the following page in Firefox, and get an error. https://www.acm.nl/nl/ Secure Connection Failed An error occurred during a connection to www.acm.nl. Invalid OCSP signing certificate in OCSP response. (Error code: sec_error_ocsp_invalid_signing_cert) The page you are trying to view cannot be shown be...
From personal, job-related experience I know that many "Booking Engines" store the CVV info for customers' credit cards from the time a reservation is made until the time the guest leaves the hotel. For people who reserve their rooms a year in advance, that means their CVV data is in the Booking Engine for a complete y...
Where does the name XSS come from? Why "cross-site"? Also, the book "The Web Application Hacker's Handbook" says that the name XSS is a misnomer when talking about "stored XSS" or second-order XSS attacks. Why?
I have had two Linksys EA4350 Routers for a week or so being used internal my network as wireless access points, and all of a sudden I started noticing requests from them once per minute (care of my apache logs) but network traffic indicates requests every 5 seconds. 192.168.1.x - - [19/Nov/2014:10:55:38 -0500] "GET / ...
I'm developing an API and used a recommended implementation of OAuth2 protocol: PHP OAuth2 Server. This library stores client ID and client secret as plain text in a database table. Note that I mean the API clients' credential, not users' credentials. I'm concerned about the case of an attacker gains access to the dat...
I have programmed my own Windows kiosk application (.NET) which requires admin rights from the OS to ensure certain services are running (amongst other things). However, this causes the UAC prompt every time the application starts. Obviously this is not ideal in a kiosk situation where the power may be switched off or ...
I found a vulnerable php script on my website. The script allows an user input (textarea), which is not encoded by htmlspecialchars(). Therefore it is possible to add html and javascript code. The maximum allowed length of this textarea is 100 characters. What would be the worst or best exploit to apply in this vulnera...
Does anyone know of any malware or exploit kit that do not use a privilege escalation kit and just do malicious things with an unprivileged permission?
I've accepted a position at a different company working on their security team and have been mentally putting together a list of questions to ask so I can rapidly get up to speed in the environment and start gathering ideas about things to prioritize. A lot of what I'm thinking of is based on http://www.opsreportcard.c...
While this isn't terribly common, I know that SQL Injection is still possible with a parameterized query, if you are calling a stored procedure that uses a parameter to construct and execute dynamic SQL. I'm curious if there are any other edge case scenarios where SQL Injection is still possible even if you are using p...
I've been battling bureaucracy at my community college for months on this issue; a few months ago, they changed security on the SSID for students; It used to use EAP, allowing students to enter their academic credentials once in their native Wi-Fi client. Now the network is open, with a redirect to a secure browser pag...
There is an older game that solely uses UDP to communicate, and I wanted to add password authentication to the game to facilitate things like experience points and rankings. To this end, I decided to go with an implementation of SRP-6a communicated over UDP using an extension of the existing game protocol, and I ended...
When I use a public computer at a certain location, logging into the workstation and going to a site like gmail.com (to check my email) I find that another user is already logged in. Same happens for facebook.com and many other sites. I always log the user out on that website, however am I responsible to do anything el...
I have created a root certificate, My Root Certificate, with a private key, RSA Private Key 1, using the openssl terminal command. I would like to make a certificate chain such as the following: My Root Certificate example.com, signed with RSA Private Key 1 How could I make this certificate chain with the openssl te...
Both bcrypt and scrypt hashing algorithms are designed to increase the resources required during the computation. Hashing passwords with these algorithms can be beneficial as it makes the task of an offline attacker more difficult. The time required to hash a password can be increased by increasing the number of itera...
I apologize in advance if I am fundamentally misunderstanding something, but is it possible to have encrypted communication protocols (https, I suppose) without resorting to a certificate system? This questions comes regarding the EFF/Mozilla initiative to "encrypt everywhere!" I understand that certificates verify /i...
There is a string: 51141010379856000173550010000111151512908026 which after encryption becomes: l4yAOVWeHlk4tnNu3HlJnxMUppeOWCpIqmRKkUPQHlgNawdYMDK2mnieDazPkJuI 51141010379856000173550010000111261161046942 which after encryption becomes l4yAOVWeHlk4tnNu3HlJnxMUppeOWCpIqmRKkUPQHligG0uPAROGtDzaPrLoYldL Another 2 exampl...
I'm exploiting machines in a network and I'm currently trying to scrape data to further my testing from the compromised machines. There's no SOE build so i've got a variety of different environments. I'm looking for any scripts like this or this (metasploit modules for IE and Firefox respectively) that can scrape both ...
I created an Excel spreadsheet using Microsoft Excel 2013 with password protected cells (only particular cells. Other cells can be edited). When I open this spreadsheet in Google spreadsheet, I am able to edit all the fields which are password protected. How do I maintain the protection from Excel to a Google spreads...
Encrypted Key Exchange can resist off-line dictionary attack Protocol : A ---> B : Ep (PK) B ---> A : Ep(Epk(K)) K is Session Key generated by B PK is an ephemeral public key generated by A B transfers K to A using double encryption. PK is a public key , its meant to be public. I am wondering what is t...
Is it possible to get the salt if I have the hash and original password? My gut feeling is no, but would it be impossible or will it just take very long?
SHA1 and MD5 hash functions are considered to not protect against collisions while SHA2 is. Is it the size of the message digest that makes this or the algorithm itself? If it is based on the message digest why did it take longer for the MD5 to be proven that it does not protect against collisions than SHA1 given that ...
I am looking for a container vitalization software that will allow me to create containers that will house specific software/jobs/tasks which I can start stop at will (and bind to interface aliases). The containers will house actual users as well as specific servers for such entities like video games. I have a few diff...
(and really sorry for my english) I have a question about Web-of-Trust of GPG. Let's say A and B signed each other's public keys and B and C signed each other's public keys. In this case A can trust to C. But, If C and D signed each other's public keys then can A trust D (even if A didn't meet with C)? What is the leve...
I could not find any match for the vulnerabilities with their CVE numbers found from OpenVAS scanner with exploits using sites such as Rapid 7 Vulnerability DB and Exploit DB, or by using a command like 'search cve-xxxx-xxxx'. Do you have any suggestions/commands for msfconsole or other ideas for finding matching explo...
I have been toying with the idea for a while now about doing my first talk, on my last project I was building a Risk Management portal for information security so I had to read all about Risk Management frameworks like NIST & COBIT etc I then had to learn about stuff like PCI & ISO27001. I kept finding articles from NI...
I have access (and the general public) to a computer lab with many workstations. Each workstation is identical in terms of software, hardware and the version of firefox. The version that is installed is 21.0, and the latest (as of this writing) is 33.3. After noticing the version I do not use Firefox on these computer...
We have a couple servers with a host system, and virtual DB and Web instances. Is it possible to be compliant with PCI if you install the Antivirus only on the host system, or does it need to be installed on all three (host, db instance, web instance)? By installing it on the host, doesn't it scanning the virtual serve...
We recently migrated our company to a kerberos-based infrastructure. I successfully set up an Artifactory repo for our java artifacts, with Apache reverse proxy and mod_auth_kerb. How can I access this with gradle?
I've implemented scrypt with two separate APIs and in both there existed no settings providing a way to substitute CPU for memory. Both were locked one-to-one with rounds and memory. However in answers from field experts it seems to be understood that scrypt can substitute CPU for memory. From openwall: Can somebody ...
I recently set myself up with a VPS and have been hardening it to the greatest extent of my limited knowledge! I was configuring OpenSSH to use certificate based authentication when something did not sit well with me. This could well be down to me missing a configuration option along the way, but if not, it is surely q...
How can my browsing habits be traced when I am at home on my own local network? Technically how is it done ?
Even though HTTPS keeps HTTP paths private, is it not the case that the generally-unique payload sizes for particular URLs (on news articles, blogs, etc) provides a mechanism to reveal the URL anyhow to an observer? If so, how would a site remedy this?
I am quite unsure about how to approach this question, was wondering if anyone could give me a nudge in the right direction, I would be most appreciative! So I've learned about the 4-way handshake mutual authentication protocol that's based on a shared secret and given secure private-key encryption scheme, but now I ne...
When non HTTP/S data is sent over Wifi, can that data be seen by other machines that happen to also be connected to that same access point? Does the privacy of the HTTP data depend on the encryption mode of the network?
I have created a website A which asks username & password, there exists another closed source website B which again asks for login credentials. A user uses both these websites .I want to implement SSO a way so that if user authenticates on website B then my Website A allows user to bypass the login interface. For th...
When sending web application users a reminder email, is it reasonably safe to include a link in the email to take them to the web application sign in form whereby the link has their username as a parameter? This is to save the user having to enter both their username AND their password. Our team's current thinking is t...
Machines such as the MS Surface Pro 3 comes with bitlocker encryption and UEFI secure boot out of the box. However, the default boot order is network -> usb -> ssd. If an attacker gets physical access to the machine (while it is locked or shut-off), is it possible for him to boot using usb (with some other OS) to comp...
Is there a way to find what type of encryption/encoding is being used? For example, I am testing a web application which stores the password in the database in an encrypted format."azOwKPoUYP4=" is the encrypted string of "admin"How do i determine what hashing or encryption is being used?
I have had a look at most of the previous questions about virtual machines (VMs) and they all appear to be focused on hosting malware in the VM and preventing it breaking out of the VM. What I can’t find is anything the other way round…for example using a VM to run an out of date OS and preventing malware compromising ...
I was wondering what the security implications are of using non-free drivers on a linux laptop. Especially for graphics and wifi.
There are several entries in my router's log file showing recent DoS attempts on some of its ports. They look like this: [DoS Attack: ACK Scan] from source: 213.61.245.234, port 80, Friday, November 21,2014 11:37:59 [DoS Attack: ACK Scan] from source: 80.239.159.8, port 443, Friday, November 21,2014 11:18:09 ... [DoS A...
I will soon be doing a very important project for school. The main goal of my project is to find a mathematical way to calculate the breakability of a given encryption method of ciphertext. Is there any way as to how I can calculate how long time it would take a computer the break an RSA encryption or a Vigenère cipher...
If I'm using something like Authy for soft tokens for my users, and they log into the web application on the mobile device itself, haven't they just lost the benefit of 2FA (ie loss of the mobile phone by itself may result in compromise of both factors)? If so, is there any reliable way to prevent users authenticating ...
My partitions C and D were encrypted and Windows 7 was installed on C. I copied all important files to D and then changed harddrive controller from IDE to AHCI, removed C and created it again and then installed Windows 7 again. After windows was installed I installed mcafee endpoint encryption. It downloaded policy fro...
My situation: I want to use a portable-app implementation of Chromium running on a removable drive, so I never leave any passwords stored on the kaychain of any computer I use. Portable Chromium is great: The app's Local storage, Application Support and Preference folders are directed internally (stored inside the app ...
Can a botnet amass and coordinate enough computing power to break encryption keys that are typically considered to be secure (through brute force)? If this is the case, do we need to make our encryption keys even stronger (e.g. higher number of bits in the encryption key)?
Our client has recently stopped getting new orders placed on their Magento eCommerce site. Could this be related with the Poodle vulnerability, as their server is still on SSLv3. Is there any specific log files I can run through to see what is going on, except the access_log and error_log.
I have a password conundrum. I need to store an encrypted password in a DB table but in such a manner that would allow me to retrieve the password as plain text afterwards. Please note that this is a business-driven decision that I have been tasked to find a technical solution for. Could anyone please provide suggestio...
I need to build an REST API that can be accessed via HTTPS when given valid credentials. How should I implement those credentials? I am looking for advice whether I should use plain old passwords, or tokens or somethings else, and why I should do so. I do not look for a tutorial on how to set up this (even though I wo...
As far as I know, I have never heard of or seen any large scale web sites like Amazon, Microsoft, Apple, Google, or Ebay ever suffer from DDoS. Have you? I have a personal philosophy that the bigger you are, the more of a target you are for such attacks. Imagine the brownie points you would get if you could bring down...
I have question regarding users point of view of this endpoint /api/user which requires POST data: email=user@domain.com and returns {"user@domain.com": "exists"} I am concerned if users might think that service returns sensitive data. Service stores emails only for logging in purpose, and never shows to anybody, but I...
On my digital forensics course I need to analyze an image and look for evidences to ask a couple of questions. One question was to find out when was the system installed, and another one was to find out when X user logged in last time. Then there is another question that asks whether there is anything wrong with those ...
I typed the following password in howsecureismypassword.net: yummy candy yummy It said it would take 100 billion years for a personal computer to crack. Is this accurate? Even though it has English words (that are related moreover) it is more secure than a random string of length 14? If this is true everyone should b...
my site recently got hacked or my users leaked out their passwords. The hacker install this plugin with a shell or backdoor in it. The file name is the "honda.zip" and inside is some Akismet plugin's files. I don't know what is it. Is is dangerous? Please let me know with as much as details you can help me. Thank in ad...
My SIP provider stores my SIP call time password as AES encrypted in stead of hashed. I understand that SIP authentication has the capability to NOT store the password, and in stead store a pre-calculated hash 'string1'. string HA1=MD5(username:realm:password) and then during authentication calculate. HA2=MD5(m...
Despite several attempts listed below certain websites are getting redirected to a certain ad website automatically, out of the blue on linux. When some website starts redirecting to this ad website is not predictable but once it happens it happens again and again. Here is what I did: Removed all browser plugins, brow...
Which websites would you usually check if you suspect that your company's address book has been leaked and is being used by spammers? I have identified https://pwnedlist.com/ for this purpose but was wondering if there are another alternative(s).
Apart from SPF, what else can be done to stop hackers from spoofing your company's email addresses?
I was about the Spring Security framework's CSRF protection to see how it works. Spring doesn't use the double-submit pattern, but instead associates the CSRF token with the user's session. The documentation includes the following explaining why that is: One might ask why the expected CsrfToken isn’t stored in a cooki...
I'm learning about the Take-Grant Model and Access Control Matrix, and I have a couple of questions regarding leaking and the safety question. Definitions These are the definitions I am using (see for example here [pdf]:) Leaking: Adding a generic right r where there was not one Safe: If a system S cannot leak right r...
Credit cards (and debit cards) are used in three different ways: In person + pin. The seller requires me to insert my card with the chip and input the PIN number to complete the transaction. In person + tap. Under $50 a simple tap would do. Not in person. Online or over the phone, the chip is not being read and no PIN...
I tried to do MITM attack on my network. I enabled ettercap, marked my router as TARGET1 and my second computer as TARGET2. Then I enabled 'ARP Spoofing'. I do not know why - but after this operation my victim has lost Internet connection. I do not see anything in urlsnarf. It seems the both sides of my plan get known ...
In our company we use a hosting provider for e-mails and it seems they don't scan incoming email against viruses. And our employees does not very careful about attachments... So we deal with virus infections from time to time. (TorrentLocker and Cryptolocker nowadays) I would like to do virus scan at network level, and...
scrypt was designed to use more memory. We can use its parameters to specify (approximately) how much memory we want it to require. But both scrypt and PBKDF2 allow us to specify the output data size. So my question is, can't we also make PBKDF2 use a lot of memory by simply asking it for a large output (and taking the...
I've got a website and I would like the users to be able to login securely but I don't want to spend any money on SSL / certificates and I would like to stay anonymous i.e. not give the certificates people my personal details. I've been reading around on some ways to do this, the best solution i've found is using a ja...