Can the identity of a person in Nigeria be confirmed? I need to find out if a person is who they say they are. Can that be confirmed?

This is probably a scam attempt. You need to sever all communication
Forgive my bluntness. You appear to be an older person. Your age-range is a primary target for Nigerian 419 scammers. Why? You're in prime retirement age, and likely have a 401k plus other savings ripe for the picking.
Please note that nobody will to start a real relationship with a random person out of the blue. Nobody will fall in love with you after a week or two: they are either a scammer, a spy, mentally-ill, a mix, or all of those. They always have ulterior motives. There are really funny ways to screw with these malcontents, but you need to be completely aware of this fact before starting. Something tells me your husband isn't aware.
Keep in mind that "Falling in love with you after a really short duration" is a classic hallmark of a spy, or scammer. Does your husband work for the defense industry? Has he in the past? Has he ever had a security clearance? Have you?
If the answer is "Yes," you need to report it to the government or you will completely lose either clearance. If the answer is "no," he's just being scammed.

Please take note

If they are offering to send you money, they are lying.
If they ask you for money, they are lying.
If they start going "Praise Jesus! He's led me to you so I can give you money," they are lying.
If they quote all the right scripture, they are still lying.
If they need your bank account information for any reason, they are lying.
If they need money for an operation, they are lying.
If they need money for a business investment, they are lying.
If they need your PayPal info, they are lying.
If they need you to do something at Western Union, they are lying.
If they provide Linked-In pages showing the company they work at, don't believe them. (Thanks, Fiasco Labs). In fact, don't visit any of their websites!
If they send you a check to cash, they are lying and you'll be in trouble. (Thanks, halfinformed)
Did I mention they are lying?

Assume the above is true regardless of their nationality. More than likely, you're communicating with someone who claims to be in Nigeria. Maybe he's a prince? Maybe he's offering to split a few hundred million / millions of pounds with you.
Don't believe him/her/it/them, unless you want to lose everything.

Additional Important Information
Rui F Riberio has offered some very important information that I believe should be considered:

If the 100USD was a bank transfer, they already know the bank account, they probably know too many details about the common passwords, parents name, etc...close the account, move the money to another bank.
I would also handle the computer as potentially compromised. One of the photos [fake photos that are really executables; buffer overflows in image parsers] / messages could have helped install a virus that is monitoring the computer. As an cautionary tale someone from my family got defrauded to the tune of 80k, and the bank order transfer came by fax when he was travelling to another continent. Due to the timing, we suspect they got the info from his own emails. Luckily enough the forgery of the signature was not even close to his, and due to Europe laws, he managed to cancel the transfer.
The investigation also found out that at the end of the day, the guy pretending to be him was calling from a voIP account in Indonesia. The guy actually called the bank impersonating him to demand that the transfer was put back in order

Using Psychology against your husband
At this point, your husband is likely too psychologically invested to give up and admit he's been scammed. Admitting that he's been fooled is much harder than coming to terms with the truth. He doesn't want to be seen as a fool, nor does he want to feel ashamed, so he keeps it going in the "hopes" that he'll be right, even if deep-down inside, he knows he's wrong about it.
Some people enjoy hurting others for no good reason, preying on basic human psychology, etc. Those are extreme sociopaths. Only a complete nutter would even desire to do something like this. They really, really don't care about either of you. All they want is your money, and they'll do anything to get it.
This is probably a scam attempt. You need to sever all communication


How to work effectively to win bug-bounties? I really want to prove myself (to my parents) by winning a proper bug bounty

  How should I best prepare for this and go about actually finding bugs?

  Edit So can anyone give some web sites which I could read that would help me understand better how to win, and what free training materials are useful? I'm working through pentesterlab already.

I've the looked up the most common vulnerabilities from OWASP things like XSS, SQL injection, PHP inclusion, CSRF, error disclosure. I've studied each of these and understand how they occur and how to demonstrate them.

I've tried to audit many lines of source code from open source projects looking for parts that haven't properly escaped user input or other important things. I also tried to do black-box testing for things like XSS on staged sites (ones hosted separate from the in-use production server, for the purpose of testing) but nothing has really turned up. I've also read the public disclosure writeups of the bugs other people found.

I understand that part of the problem is that there are people with years of experience who will find things first. And there are also people (like researchers) with much deeper knowledge in specific areas.

But even so I think I should be able to make a positive contribution if I work hard, so I would appreciate any guidance

The fact that you are trying to 'prove' something to someone else confuses the process.

Look for bug bounty programs
Look for the most error-prone service
Use your knowledge to find a bug

If you try to look at the major products/services, you are aiming too high. Choose something small and overlooked.


Stolen Laptop - Next steps My laptop (modded 2007 Macbook Pro) was stolen 2 days ago when I didn't pay attention to my backpack in a tourist spot in Europe and while I'm quite certain they won't have much use for it (the apple is orange :) I'd still like to make sure I'm thinking of everything. What are the next steps, what can I ignore? This is the situation:

OS X 10.8, no HDD encryption, no anti-theft measures (Prey etc)
Accounts: Admin + separate, limited User account with complex passwords, Account names are not pre-filled
CVs etc with lots of private data, also outside of User folder on 2nd HDD
Bank Account, FTP, Mail passwords encrypted in KeePass, nowhere as plain text, none connected to birthdays or other (guessable) personal data
No passwords saved in browsers
Lots of e-mails with sensitive and other data, contact book etc in User folder (how easy is it to access those?) as well as my .ssh directory
Just realized: locally stored websites with config files that contain passwords to my server & DB in plain text (!)

Am I thinking in the right direction? Should I change all my passwords? Any guess of the likelihood that a (crappy looking) tourist laptop will warrant any attention or does this not matter at all, because I should just assume worst case anyways?

Thanks a lot in advance!

Yes - definitely change your passwords. It is a low effort way to fix a lot of potential problems!

It used to be that laptops would be wiped if they had a password on, but the tools to glean data off them are so commonplace/simple now, most attackers will try and see what is on there - as they can make a fair bit of money from account details held on laptops.

Don't assume no passwords are saved - more is saved than you think, as browsers and operating systems try to be helpful.


Best way to keep cell day to day phone calls private - is VOIP better? This question is about preventing eavesdropping by hackers, thieves, or other smart people collecting information for shady purposes.

Is it better to buy a smartphone and install a VOIP service on it like Google Voice or Skype and then use the data connection to make calls? Or does simply owning a smartphone create more problems than it solves?

What do you do when you are making calls to people who are not security-conscious enough to have install any special applications on their phones?

To be clear, this question is not concerned with surveillance by the NSA or other government authorities.

To be clear, this question is not concerned with surveillance by the NSA or other government authorities.

If you are just dealing with the average hacker than listening to normal calls is not a problem. Communication within the mobile network are encrypted and although the encryption is weak enough for government it is still strong enough for the average hacker.

But note that the not-so-average hacker can obtain or build stingray like devices and thus intercept and decrypt the communication.

  Or does simply owning a smartphone create more problems than it solves?

Given the amount of information the applications on the smartphone collect about you for monetizing it might be better for the average user to stick with a dumb phone than to use a smart phone. This is at least true for the Android phones where a large part of the phones has known vulnerabilities and some of these are  actively exploited. It might be different for the more closed and more tightly updated iPhone but malware is known there too.

The situation might be different for a not-so-average user who is able to harden the phone and make it do only the things the user actually needs or for the user buying pre-hardened phones. In this case better encryption found in various messaging and phone application might actually provide more security than the usual encryption of mobile communication. It still leaves the problem what information are available for the hacker by simply stealing the phone. These data are usually only protected by weak authentication, i.e. fingerprints which can be faked, pattern  are often not that hard to find out too and passwords can often be guessed or are known by should surfing.


Trying to determine if someone was "DoS'd" I'm part of a pretty small video game community and one of our members claims he was DoSed or DDoSed during a recent match.  We are currently split as some people believe he was and others believe he wasn't.

Here are the router logs from the night:

Some of the arguments for:
He was being sent packets from spoofed IPs.  He was also being sent packets to port 4444 which is apparently used for malicious purposes.

Additionally one of the people who reviewed the information said that to be in this log it had to be an "Active" connection and that it wasn't just 4-5 fragmented packets but 4-5 connections.. is this accurate?

He also ran a Malwarebytes scan to see if he was infected with anything. The scan was clean.

People are also suspicious of the time and length of the attack.  It happened when his team was Up 1 game, and lasted until the series was over and his team had lost (playing the final match down a member without him)

Arguments Against:
Low number of Packets, and that random "bots" may have attacked him.  Not really sure about the second one.

Just curious what a more professional opinion is so we can try to resolve the situation.. any help appreciated.

Based on the information you have provided, I would say that the player was not victim of a Distributed Denial of Service attack. The amount of packets captured in your log are way to small in quantity, however this does not mean that the player couldn't have been DDoSed without the packets being in your log. On the other hand, it seems that the packets that are logged state that they are fragmented. This is a common DDoS tactic, because the targeted machine will try to re-assembled the thousands of fragmented packets, therefore tying up system resources causing lagging or a system crash. Also, I can see in your logs that there was a port scan done, but probably not to the same machine. A port scan is beneficial to attackers because it will tell them what ports are open on your computer. Sending packets to a closed port won't get them very far. In addition, a Distributed Denial of Service attack is just what is states, the denial of a service, specifically internet connection. A DDoS attack can sometimes be used to get a system to reboot or cause a distraction, but does not directly infect a computer with a virus.

To reiterate, the information you have provided does not give me much information to give you a solid answer. However here are some tools and resources that may prove to be beneficial.

Loss of Internet Connection: This is pretty much your tell tale sign that you might be victim of a DDoS if it was successful. If the attacker did not have enough power, your system may just lag.
Your Internet Service Provider (ISP): ISPs hate DDoS attacks as much as you do because the surge of traffic is going through their networks too. At the very least, you could call your ISP to see if they noticed an abnormality in your usual internet traffic.
Packet Captures: There are free tools available such as wireshark that will capture all traffic going in and out of your machine. If you notice an huge influx of traffic, that is a good indicator. However, this tool must be running when you suspect foul play of course. It is of no use after the fact.
Netstat Utility: Another easy way to determine if a DDoS attack has occurred is through the built in Netstat utility in windows (assuming that is your OS) that is explained here. This site will show you how to run a netstat command to show connections made to your machine, and how to analyze them to see traces of a DDoS attack.

Given the resources listed, I would say your best bet now would be to contact your ISP. If you are able to update your question with any more data, I can revise my answer accordingly.


TLS protocol, session key for secure connection In Wikipedia, as part of handshaking between a client and a server, the server send a public encryption key as part of the digital certificate.
Then the client uses Diffie–Hellman key exchange to securely generate a random and unique session key for encryption and decryption.
Questions:

is the public key sent by server encrypted or clear? I assume it is clear since it is public
How are the session key and public key related? Does the client sends session key to the server?
session key sent: f(Random_gen_number, Public_key) where f is an encryption function?

is the public key sent by server encrypted or clear? I assume it is clear since it is public

The public key of the server is contained in clear in the server certificate which is send in clear by the server, which means that the public key is implicitly send in clear too. Note that this is only the case with certificate based server authentication which is the most common way to authenticate the server in TLS but not the only one. Other ways to authenticate the server are for example pre-shared keys (PSK) where no public keys are involved at all.

  How are the session key and public key related?

The result of the key exchange is a pre-master secret which then gets used to derive a master secret which then gets used to derive the session keys, i.e. the keys to encrypt and protect (HMAC) the application data.

If Diffie-Hellman key exchange is used as you state then there is no relation between the public key and the pre-master secret and thus not between the public key and the session keys. The only use of the certificate in this case is to authenticate the server and it plays no role in the key exchange. Diffie-Hellman key exchange can also be used for TLS handshakes where no public key is involved at all, for example with PSK authentication.

  Does the client sends session key to the server? session key sent: f(Random_gen_number, Public_key) where f is an encryption function?

With Diffie-Hellman key exchange there is nothing even similar to this. With RSA key exchange the client instead creates the pre-master secret fully on the client side (i.e. it is not a result of a key exchange where both parties are involved, like in DH key exchange) and sends it to the server encrypted with the public key of the server. The server then decrypts this with its (secret) private key and thus can extract the pre-master secret. The process of deriving the master secret and the session keys from this is then the same as with DH key exchange.

This process of sending the pre-master secret to the server also means that knowledge of the servers private key allows to retrieve the pre-master secret, derive the session keys and decrypt all traffic. This is true even for older traffic if the traffic was captured at some time and the attacker or secret service got access to the private key only later. Contrary to this with DH key exchange no actual exchange of the pre-master secret happens but instead it is derived on both sides. Having access to the private key of the server will not allow an attacker to decrypt the sniffed traffic, i.e. an active and real-time man-in-the-middle attack is instead needed. That's why DH key exchange is the preferred one today and the only one support starting with TLS 1.3.


Strange messages from Gmail regarding my recovery email address changing I have several google/gmail accounts for various purposes.   This morning I woke up to the following message from google saying the recovery email address had changed.   Here is the email

Your recovery email address changed
Hi VNS娱乐城876502.com注册送88元,网上最火爆的游戏平台,超好赢钱游戏,
The recovery email for your Google Account g*****737@gmail.com was recently changed.

Don't recognize this activity?
Review your recently used devices now.
Best,
The Google Accounts team
This email can't receive replies. For more information, visit the Google Accounts Help Center.

The thing is, neither VNS娱乐城876502.com注册送88元,网上最火爆的游戏平台,超好赢钱游戏 nor g*****737@gmail.com are email addresses that I have ever used before.   Why would I receive a notice about an email recovery account I do not own having the backup email changed?

Here is a screenshot

From all appearances it looks like the email is actually from google.

Then at 12:01 AM last night I get the following email telling me someone is trying to login to an actual email account I do own.   Luckily I use randomized passwords plus MFA for everything that allows 2 factor auth.  Any time someone tries to login to any of my google accounts from any computer that I have never logged into before will kick off the MFA request.

  Review blocked sign-in attempt     You received this message because
  r*****6@gmail.com is listed as the recovery email for
  e*****e@gmail.com. If e*****e@gmail.com is
  not your Google Account, click here to disconnect from that account
  and stop receiving emails.     Hi John, Google just blocked someone from
  signing into your Google Account e*****e@gmail.com from
  an app that may put your account at risk. Less secure app Sunday,
  October 23, 2016 12:01 AM (Pacific Daylight Time) California, USA*
  Don't recognize this activity? If you didn't recently receive an error
  while trying to access a Google service, like Gmail, from a non-Google
  application, someone may have your password.

  SECURE YOUR ACCOUNT

  Are you the one who tried signing in? Google will continue to block
  sign-in attempts from the app you're using because it has known
  security problems or is out of date. You can continue to use this app
  by allowing access to less secure apps, but this may leave your
  account vulnerable.

  Best, The Google Accounts team

I have already went ahead and changed my password for the account in question, but I was wondering if there was any further action I should take to secure my gmail account past what I am already doing?

This is a suspicious email. I would suggest you check and analyze header of the email you recieved and verify if its sent from google. Also check IP of the sender.
Check this link for more info;  http://www.howtogeek.com/108205/htg-explains-what-can-you-find-in-an-email-header/


Is it possible for guest system to spy host system when using virtual maschine (VMware) I want to prepare virtual maschine which will be used to connect through vpn with one of my clients. There are some other programs and devices that I have to install in order all of this to work. However there is a security concern. On host system I've mailbox and other stuff from my corporation. Is there any way that guest system will successfully try in any way to monitor what is happening on host system (for example by reading emails, checking network trafic, doing screenshots and so on)?

Ostensibly, the answer is no. The architecture of most virtualisation platforms abstract the activity of the virtual 'guest' machine from that of the physical 'host' machine. There are, however, a couple of caveats to this:

Primarily, you are reliant of the security of your virtualisation platform, the major players (VMware, Microsoft hyper-V, Oracle) all have very good security track-records for host segregation, and I'm not aware of any publicised flaws. That said, the fact that the guest machine's processing and memory are still intrinsically based on the processor and memory of the host machine means that there could be exposure were flaws to exist in the software; this is however theoretical.
Host Tools. Most virtualisation platforms provide some form of tool/service which runs on the Guest OS and allows limited communication between the virtualisation service and the guest (e.g. VMware Tools). Again, whilst I am not aware of any identified flaws that could allow the breaking of the 'virtual curtain', it wouldn't be beyond the realms of possibility.

In this instance, I would suggest that you can get a very high level of assurance around the separation of your host and guest through the use of a current version of one of the major virtualisation platforms.

I hope that helps.

Brendan


Can I use a normal wifi adapter instead of a alfa card for evil twin attack? I am new to security and more leaned on application security. But now I learning attacks like the evil twin I need an wifi adapter (correct me if I am wrong ) to do the attack.
 I live in a remote country to the South and Alfa cards are hard to get around here. (do not ask me why)... The question is can I buy a normal wifi adapter and use it with the same functionality as an Alfa card knowing it will be different in terms of efficiency and signal capability just to understand and learn the evil twin attack and so on?
I ask because I had only one wlan interface on my Kali Linux and cannot use it to set up a for AP... Should I obliged to buy an exact Alfa card for this or wifi adapter should be good enough?

The external Alfa wifi adapters are recommended because they use wi-fi chipsets that support all the necessary operations (e.g. packet injection and monitor mode) that are required for full use of the aircrack-ng suite, and the latest Kali distros support them out of the box without much faffing around.

This reply explains it more fully.


Do .crt and .key files contain sensitive information? Some of my end-to-end tests require making calls to a mock https server, so I've written a very basic one in JavaScript and generated .crt and .key files for it on my employer's computer.

Now my employer asks to open-source the project. This would mean publishing both files to a public repository. Naturally, some members of the team questioned the contents of .crt and .key files.

Do .crt and .key files contain sensitive information? Is it safe to publish them in my specific case?

The .crt file embeds the public key and could theoretically be published. The .key is the private key and should not be published.

Ideally, you don't want to publish any certificates at all, and add a notice for users of the project on how to generate/get their own certificates.


Understanding a DMZ with multiple servers I get the general principle of a DMZ i.e. place public facing servers in the DMZ to isolate and protect the corporate LAN. I have a web application which is to be public facing, this web app needs to communicate with a database server, so a pretty basic requirements.

Web App only requires to communicate over a specific port to the DB so all non essential ports would be closed. I am trying to protect the database as much as possible in case the web app is compromised.

My question regards the location of the database server should this be in the DMZ as well or does it have to be in the DMZ? My thinking is if the database is not in the DMZ and located on the corporate LAN at least one port is open to the database meaning a connection exists to the corporate lan and therefore defeating the benefit of a DMZ, so based on my logic the Database needs to be in the DMZ?

The purpose of the DMZ is to do not expose your DB directly to Internet. Instead you expose it to your web application, and your web application to Internet. But you need to take care of the security of both the web app and the DB.

If your web application gets compromised, it doesn't mean that the DB is as well. There are various vectors here, for example, you could have a SQL injection vulnerability in your code, so it would be irrelevant whether the DB is in a DMZ, private subnet or even the same host as the web application, because an attacker could retrieve info anyways.

Another example, somehow your application could lead to access the OS. But if your system is carefully hardened, the attacker could only access the resources the webapp user has access to. The database should not be any of those resources.


Why we should not mix http and https when using iframes? In the administration of advanced iframe I came across following:

"Please do not use a different protocol for the iframe: Do not mix HTTP and HTTPS if possible!".

Please explain the below points.

If the protocol of my page is HTTP than use an HTTP page inside the
iframe.
If the protocol of my page is HTTPS than use an HTTPS page
inside the iframe.

[HTTP on HTTPS]By mixing http with https you'll endup with mixed content in your site(in websites) hence the green code in your site that indicates your site is secure will be replaced with a site-is-insecure for that specific page that contains a http call.

Its insecure because generally you'll be serving content on a secure protocol via an insecure tunnel(info on that page can be accessed via a HTTP link) . Anyone with a little know how of how things work on the web can easily intercept the data and even maybe rewrite it for his/her/its own benefits. Imagine if for example Google was serving its services via HTTP, think of how many phishing grounds that would create(hackers trying to get sensitive data), users would no longer be able to know which is the actual secure site and they would end up loosing if not all at least a third of its customers.


Has Ubuntu been patched for KRACKs? I updated my Ubuntu 14.04 LTS.

My /var/log/apt/history.log says that linux-signed-image-3.13.0-134-generic:amd64 has been installed.

The changelog page says

linux (3.13.0-134.183) trusty; urgency=low

  linux: 3.13.0-134.183 -proposed tracker (LP: #1722335)

  [ Thadeu Lima de Souza Cascardo ]    * CVE-2017-10661

  timerfd: Protect the might cancel mechanism proper

  CVE-2017-10662

  f2fs: sanity check segment count

  CVE-2017-10663

  f2fs: sanity check checkpoint segno and blkoff

  CVE-2017-14340

  xfs: XFS_IS_REALTIME_INODE() should be false if no rt device present

  CVE-2017-10911

  xen-blkback: don't leak stack data via response ring

  CVE-2017-11176

  mqueue: fix a use-after-free in sys_mq_notify()

  CVE-2016-8632

  tipc: check minimum bearer MTU

  -- Juerg Haefliger  Tue, 10 Oct 2017 13:23:11
  +0200

This does not look like patch for the Key Reinstallation Attacks.

Should I assume that a patch has not been released yet? Was it released prior to the divulgation of the attacks? Do I wait?

The Linux kernel itself is not affected. The part responsible for WPA is wpasupplicant. From the Changelog:

  Version: 2.1-0ubuntu1.5   2017-10-16 17:06:43 UTC
    wpa (2.1-0ubuntu1.5) trusty-security; urgency=medium

  SECURITY UPDATE: Multiple issues in WPA protocol

  debian/patches/2017-1/*.patch: Add patches from Debian jessie
  CVE-2017-13077, CVE-2017-13078, CVE-2017-13079, CVE-2017-13080,
  CVE-2017-13081, CVE-2017-13082, CVE-2017-13086, CVE-2017-13087,
  CVE-2017-13088


How could attackers exploit $_SERVER['HTTP_REFERER'] I've been warned that PHP's $_SERVER['HTTP_REFERER'] is a common attack vector for websites. What are ways that attackers exploit this function? How can I guard against them?

If the website makes certain security decision based on the referer and performs no other security checks, you can spoof this value.

Also, if you are sending raw HTTP, you could use this for some type of injection or possible XSS attack. For example, if the web page behaves differently based on the referer, it might take the referer as input to a function. Since the referer is not commonly a user input field, they may forget to do proper sanitization against this field, giving you an in to do any type of input based attack.

Some more from OWASP:

Using referer field for authentication or authorization
Sites may use referer as a weak form of CSRF protection
Hotlinking to improve phishing quality or cost


Which specification does Java HostnameVerifier come from? Java HostnameVerifier defines an interface for hostname verification. Which specification does it come from? TLS or HTTPS or X509?

The HostnameVerifier interface is specific for Java, i.e. the interface itself does not follow any standards except the specification of Java. The actual implementation of the hostname verification should though follow established standards.

How a hostname verification should be done when checking the server certificate of a TLS connection is mainly defined in RFC 6125 for various TLS based protocols in general and specifically for HTTPS in the older RFC 2818. While there are in theory differences between various TLS using protocols (HTTPS, IMAPS, POP3S, LDAPS...)  specifically regarding the use of wildcards most implementations ignore these differences and just implement the way the verification is done in HTTPS.

Apart from RFC 6125 also the CA/Browser forum requirements are relevant. But these are usually only implement fully in the browsers, most programming language don't care about things like Public Suffix lists and their relation to wildcard checking.


How to protect against skimmer attack like in the BA data breach British Airways has suffered a big data breach allegedly because of a skimmer attack, whereby malicious javascript code was injected into their site.
See https://www.bbc.co.uk/news/technology-45481976

My question is, how to you protect against these kinds of skimmer attacks when modern websites rely so much on third-party javascript libraries?

how to you protect against these kinds of skimmer attacks when modern websites rely so much on third party javascript libraries?

Simple answer, you cannot. If you use a third-party library by referencing it by URL and not copying the actual library files to your site, then you trust the third-party library maintainer to do his job (keeping you safe).

Miscreants know this and try very hard to infiltrate code into these third-party libraries.

More techy info on the subject: https://www.theregister.co.uk/2018/09/12/feedify_magecart_javascript_library_hacked/

Option 1: Do not use third-party libraries.

Option 2: Copy the actual JavaScript files to your site*, purge all unused code, maintain them yourself (you are creating a fork - added later after comments)* a̶n̶d̶ ̶u̶s̶e̶ ̶t̶h̶e̶m̶ ̶f̶r̶o̶m̶ ̶t̶h̶e̶r̶e̶. You will have to make sure you are allowed to do this (e.g. copyright, license), obligations might apply.

EDIT (after one comment):

Does not matter what you use, if you load resources from third parties, any resources, even encrypted, you trust the third party to keep you safe. Even option 2 (Copying the files) is not safe, unless you vet each line of every file you have copied and even then ...  Option 1 is, imho, the only way to be sure.

Option 2 is safer than linking to remote resources because the punk would have to change the code on your server (provided, of course, the code was "clean" when you copied it), and if you have a punk on your server then you have other problems ...

Any 3rdparty can potentially be defeated and will attract more attackers if it is widely used. This has happened in the past already, with punks injecting cryptominers in JavaScript libraries, defeating Subresource Integrity, the code was sneaked into the libraries, the 3rdparty server "thought" the code was genuine ... not sure what happened with B.A., how the changes made their way into the website ...


Security vulnerabilities when sharing files between virtual machine and host According to this link, when running a windows OS virtual machine on a windows host OS, one can share files like one would share files between two computers on a network by ensuring that file sharing is enabled on both operating systems.

My mom her computer infected with ransom-ware, which resulted in her needing a new OS and losing all of her data. :-(

I am thinking installing a virtual machine on her computer for her to use when browsing the internet and looking through emails (she's not very cautious when it comes to emails and links in them).  I want to make it so that when she works on documents in the VM she can save it to the host system to access later. However, I'm concerned that this would defeat the whole purpose of working on a VM.

Is it possible for ransomware to spread to another computer through a shared file system that windows provides? I'm also assuming other malicious viruses and malware can spread through such a connection, correct?

To prevent such things from happening, could I not just share only the specific folder on the host system where the files will be stored?

As MiatoHatola pointed out, moving possibly infected files from the VM to the host system exposes the host to all the dangers the VM is exposed to. You can migitate that danger, for example by automatically scanning files in the shared folder, or by removing most software from the host that would be used to open these files. For example, you could remove the web browser from the host system, which would force your mother to use the VM to browse the web (humans are lazy; she will forget to open up the VM if she can just run the browser on the host) and remove all browser exploit attack paths from the host system.

Thinking about this a bit more, you might arrive at the conclusion that it makes more sense to do certain tasks entirely in the web browser VM, and other tasks entirely in the host. This will reduce the number of files your mother must shuffle from VM to host. Then you might think about moving all tasks to special VMs: For example, there might be a VM for everything that's untrusted, e.g. web surfing, reading mail and looking at documents downloaded in the untrusted VM, and a VM for everything else that's network related, but trusted, such as E-Banking, and yet another VM for doing stuff that doesn't need network access (personal finances, writing letters, doing your tax returns etc). For this VM, you can remove the virtual network interface so it can't possibly connect to the network. The host would just be there to start the VMs.

The advantage of this is that you reduce the attack surface significantly, because you isolate tasks from each other and reduce the amount of data that must be exchanged between the VMs. Also, if malware such as ransomware actually makes it to one of the VMs, you will most likely notice it before it can spread to every other VM. So the damage stays localized.

The disadvantage is that it makes working with the computer more difficult. Your mother will need to remember which VM is for which task, and she'll need to put up the discipline to use the correct VM for the task at hand. You can enforce some of that, for example by making the firewall only connect to trusted sites from your "trusted network VM", and by controlling which software is available in a VM, but it's still a bit of a hassle, especially when she wants to do something for which there isn't a clearly defined task boundary.

Qubes OS is an Operating System built on this idea, and tries to streamline the involved workflows, but it's probably not something your mother is going to be happy with.

If your main point of worry is another ransomware attack, diligent backups are a much easier solution.


What is the purpose of subdomain enumeration? There're a number of security tools out there that enumerate the subdomains of a given domain. I wonder:

What's the purpose of that in terms of security / hacking?
Is there any way to do that other than by brute-force with a dictionary of the most popular subdomain names?
How to protect my domain against subdomain enumeration?

What's the purpose of that in terms of security / hacking?

The hostname(s) of resources can provide valuable information to narrow the scope of an attacker's task by providing information about available machines and resources. The underlying space of network (IP) addresses is sparsely populated (and IP:port combinations even more so), so narrowing down the addresses at which the organization hosts machines significantly reduces the preparatory work necessary to locate machines, map the topology, and launch an attack.

For example, the presence of a name ssh.company.com in the DNS provides hints of machines which probably host an SSH daemon. In the first instance, it is reasonable to suppose that daemon runs on its default port, significantly reducing attack overhead and advancing to the stage of probing for vulnerabilities. By contrast, scanning the large IP ranges of an organization (if known a priori) is slower, more time consuming, and more likely to trigger early alerts in firewalls and IDS devices of port scan attempts.

  Is there any way to do that other than by brute-force with a dictionary of the most popular subdomain names?

Yes, there are alternative methods, which might be available depending upon the degree of (mis-)configuration of the relevant infrastructure. Here is a list of common methods:

A dictionary attack operates passively by sending standard DNS queries for common hostnames. By definition, it cannot guarantee to provide a full enumeration of a zone, but it will always find any resources with common hostnames. This attack vector cannot be mitigated without impeding the proper functioning of the DNS.
A brute-force attack also operates passively, but generates all possible combinations of hostnames. Such an attack can be exhaustive, as RFC 1035 limits the maximum permissible length of a DNS label and the overall length of an FQDN (§2.3.4). However, this would be extremely time-consuming, especially given the sparse population of the DNS namespace.
A zone transfer attack attempts to request a zone transfer from an authoritative DNS nameserver for a given domain. A zone transfers represents a dump of the entire zone contents, which is typically used by slave servers to update their locally cached copy of a zone. A successful zone transfer provides an enumeration of an entire zone.

Most sysadmins provide some security-by-obscurity by restricting the source IP addresses which may submit zone transfer requests. Hence, this attack can only succeed if: a server has an open zone transfer policy (anybody may submit a zone transfer), the attacking party can observe a zone transfer in progress, or the attacking party gains the ability to issue packets from one of the trusted IP addresses, perhaps by traffic interception in the network.
An NSEC walking attack can enumerate DNSSEC-signed zones. DNSSEC must assert the non-existence of records in a zone to prevent attackers spoofing NXDOMAIN responses in an attempt at denial-of-service. The provision of a denial-of-existence proof is commonly achieved by sorting the zone records and linking them in a chain of NSEC records (each signed). It follows that the intervening namespace between each NSEC record contains no valid resource records.

However, this technique necessarily allows the NSEC space to be trivially walked to enumerate a DNS zone.

Various alternative mechanisms for minimizing this risk are proposed:

Online signing, in which the NXDOMAIN responses are generated ad-hoc and iteratively restrict a smaller and smaller subset of the namespace (e.g. restricting a.domain.com, then aa.domain.com, then aaa.domain.com). However, this approach requires a signing key to be distributed to slave servers, which spreads keying material further than perhaps desired.
NSEC3 records introduce hashes into the denial-of-existence proofs. The hashes are signed statically, obviating the need for slave servers to be provided with a copy of the signing key. As the hostnames are hashed, walking the chain of NSEC3 records is no longer trivial and attracts significantly greater overhead, although some claims exist that this is still not sufficient.

Wikipedia has a good view on the whole issue.

  How to protect my domain?

Protecting against the above attacks should be your first line of defense, through properly configured nameservers and carefully considering any deployment of DNSSEC. However, you cannot fully eliminate the threat of a dictionary or brute-force attack without breaking proper DNS functionality.

You should remain cognizant of the fact the DNS is public information; although it is perhaps good practice not to give up your zonefile to anybody who requests it, this is just security-by-obscurity. Defense-in-depth security techniques should still be adopted through appropriate security precautions in your network topology, training your system users against social attacks, properly tightening any public-facing daemons you might operate, and whatever else your written security policy dictates.

Zone transfer testing

It is easy to test (or experiment) with DNS zone transfers using the dig(1) utility under your favorite *nix environment. Finding a zone which allows you to transfer it is another matter, but digi.ninja provides the zonetransfer.me example for this purpose. The following command should demonstrate a successful zone transfer against the zonetransfer.me zone, which will provide you with a full enumeration of this demonstration zone:

dig @nsztm1.digi.ninja zonetransfer.me AXFR

You can test your own zones by replacing the relevant fields in the command. A failed attempt should elicit the response

; Transfer failed


Security margin of a winzip, Winrar password of 64 characters against GPU cracking what s the longterm security margin of of a winzip or Winrar  file encrypted with aes-256 and a password consisting of 64 completely random characters  set a-z 0-9 and other printable special characters)?

How long will such a file be safe against an enemy with a large GPU cluster?

My own calculation is that the possible number of passwords is 96^64.

I have searched but all the amazing success stories turning up are about bruteforcing of weaker MD5 and Windows passwords.

Very little specific about cracking of Winzip, Winrar or PGP protected files on GPUs where the password is longer than 10 characters.

Does it mean that Winzip, Winrar and PGP encrypted files are not easily subject to the same attacks?

Or does it mean that we'll have to wait a few years before this security margin is broken by evolution in computational power?

Modern versions of WinZIP and WinRAR employ fairly slow key derivation in order to combat password guessing attacks. In particular, WinRAR uses scheme where number of effective SHA-1 iterations depends on length of the password (longer passwords yield more iterations), and WinZIP uses PBKDF2-based function, IIRC.

"Fairly slow" is not a precise metric. For WinZIP actual speed will depend on ZIP file format; older formats used weak encryption and weak key derivation; later formats are much better in that respect. If you need some numbers, you can assume one modern GPU can deliver about one million passwords per second. For WinRAR that figure is much lower and will likely be below 50'000 passwords/sec per GPU.

Using those figures you can actually estimate what length of a random password is sufficient for your purposes (e.g. how long it should resist attacks).

I'd also like to note that 64-char random password is an overkill. 20 characters will already give you more than 128 bits of strength which is more than sufficient (encryption in WinRAR is AES-128 anyway). If you want 256 bits of strength then 40 characters is sufficient.


What is the actual value of a certificate fingerprint? In a x509 digital certificate there is a "certificate fingerprint" section. It contains md5, sha1 and sha256. How are these obtained, and during the SSL connection, how are these values checked for?

The fingerprint, as displayed in the Fingerprints section when looking at a certificate with Firefox or the thumbprint in IE is the hash of the entire certificate in DER form.

If your certificate is in PEM format, convert it to DER with OpenSSL:

openssl x509 -in cert.crt -outform DER -out cert.cer

Then, perform a SHA-1 hash on it (e.g. with sha1sum1):

sha1sum cert.cer

This should produce the same result as what you see in the browser. These values are not part of the certificate, rather they are computed from the certificate.

One application of these fingerprints is to validate EV certificates. In this case, the SHA-1 fingerprint of the root EV CA certificate is hard-coded in the browser (note that (a) it's the fingerprint of the root cert and (b) it has to match exactly the trust anchors shipped with the version of the browser compiled with those values).

Apart from this, these fingerprints are mostly used for identifying the certificates (for organising them).

It's the actual public keys that are used for the verification of other certificates in the chain. The digest used for signing the certificate is actually not in the certificate (only the resulting signature). See certificate structure:

   Certificate  ::=  SEQUENCE  {
        tbsCertificate       TBSCertificate,
        signatureAlgorithm   AlgorithmIdentifier,
        signatureValue       BIT STRING  }

   TBSCertificate  ::=  SEQUENCE  {
        version         [0]  EXPLICIT Version DEFAULT v1,
        serialNumber         CertificateSerialNumber,
        signature            AlgorithmIdentifier,
        issuer               Name,
        validity             Validity,
        subject              Name,
        ...

In this case, the signature value is computed from the DER encoded tbsCertificate (i.e. its content). When the signature algorithm is SHA1 with RSA (for example), a SHA-1 digest is computed and then signed using the RSA private key of the issuer. This SHA-1 digest has nothing to do with the fingerprint has shown by openssl x509 -fingerprint or within the browser, since it's that of the tbsCertificate section only.

There are also a couple of unrelated extensions that can make use of digests, of the public keys this time: the Subject Key Identifier and the Authority Key Identifier. These are optional (and within the TBS content of the certificate).


Setup to be somewhat anonymous Would I be "somewhat anonymous" if I purchased bitcoin using my real bank account, used that bitcoin to purchase a VPN-service that I can trust does not keep any logs, and use that VPN-service through TOR?

I may want to write about somewhat controversial subjects on the internet and watch some copyrighted streams of TV-shows. So by "somewhat anonymous" I don't mean the most hardcore security agencies, but private people, enforcers of copyright law etc.

Anything I should think about, anything I've gotten wrong? Tips?

The problem is the transactions with bitcoins are publicly logged so anyone can see the bitcoin transaction.

There is a page from bitcoin wiki on how to keep your bitcoin anonymous titled Bitcoin Wiki - Anonymity. There is a section "Staying Anonymous", that will explain you how to transfer the coins between many accounts from different  eWallet providers.

So to your first question

  Would I be "somewhat anonymous" if I purchased bitcoin using my real bank account, used that bitcoin to purchase a VPN-service that I can trust does not keep any logs, and use that VPN-service through TOR?

Its no, first of all buy the bitcoin with cash and in small quotes and you still need to transfer your coins through several wallets - instead of tor use tails , its a whole amnesic and anonymity distro instead of just a anonymity browser. Use proxychains and a vpn as well to create the ewallets and transactions.


Trustable Sources For Security Algorithms and Standards? I am learner of cryptographic algorithms and security standards. I usually Google it to understand the basics of the algorithm or the protocol, and to find an implementation of a protocol. However I can never be sure if the algorithm I am looking for is in its globally accepted form. The source can be either books or websites.

To explain what I want to read from the trustable sources, I can give the examples below;

About a cryptographic algorithm: AES Algorithm or AES-CBC mode algorithm ,Implementation of AES-CBC , Implementation of SHA-256

Protocol: The Transport Layer Security (TLS) Protocol Version 1.2

A security standard:  PKCS - Public Key Cryptography Standards

Information security is improving and changing very fast. And I always want to keep myself updated as soon as possible. I would like to know the most recent sources. In addition, when I write an article, I would like to refer to globally accepted sources. It would not be good practice to refer an information from Wikipedia or a random website. I think that one source that I can refer is NIST. Also, I can trust to the official publication of an algorithm.

To conclude, which sources can I use without doubt while doing my research about a security standard, or algorithm?

There is no central repository from where to get this kind of source.

What you should do, is to get the official publication of any standard you want to refer too. You can either find it by yourself, with a search engine, or by reading other article that cite this particular standard.

A lot of protocols are RFC, published by the IETF.

Good Wikipedia articles usually reference the main paper in its sources.


How can I improve my sheep dipping process? Problem:
The hiring department occasionally sends me Word documents asking to clear the file as "safe" to open and review for purposes like resumes etc.; they can come from anywhere and are often unsolicited job applications.
Based on the cornucopia of Word exploits out there and my relative inexperience I get a slight "nnngg" feeling every time I save one to my on-network machine to "check". I feel like I will be held responsible if I say something is safe, but realize pros commonly use free and paid malware scanners to make sure their exploits will pass scans. Before I took the role of "toothless cybersecurity champion" they essentially opened everything and hoped the MSP caught/stopped the bad stuff.
My "checking":

Save file as to desktop from Outlook.
Upload file usually to Virustotal and Jotti's Malware Scan
Scan with the local endpoint scanner.
If all scans negative: tell them to view the document but never click "Enable Editing, Enable Macros etc." (So far I can only assume they follow this advice but have no method of confirming).
Yes I realize this scanning could probably just be done by the receivers at this point, but this would only apply to documents of a non-sensitive nature, since I'm already disclosing them to VT and Jotti's

My improvement ideas:

Don't accept unsolicited Word docs (hard to enforce with high business impact, was actually laughed at for this).
Make a VM/off-network machine and send/open everything there first and monitor/binwalk (high time commitment with questionable success).

Question:
Are there any other obvious (to someone with more experience) ways I could improve my sheep dipping process?

You could convert it using Linux, or FreeBSD, and OpenOffice.
Install a VM with Linux or FreeBSD, or any OS that isn't Windows and have a OpenOffice release. Share a folder between the VM and the host, and save the file there.
On the VM, open the file on OpenOffice, and save it on a different format. RTF is a good option because it is open, can be opened on a lot of editors, and both MS Word and OpenOffice can work on it, and will strip all macros and active content from the original document.
If the file don't need to be sent back on an editable format, you can use the Print to PDF function to generate a pdf file and send back to the user.


SSL MITM attack vectors for server to server HTTPS using an untrusted certificate? I have noticed a large amount of server-side HTTP client libraries accept untrusted TLS communication by default.

What are obvious attack vectors for MITMing a server-to-server HTTPS communication that accepts untrusted SSL certs?

Eg, DNS cache poisoning could be used to replace the real endpoint with an attacker's replacement that uses a self-signed cert.

As @steffen-ullrich mentioned, someone could rent a server in the same datacenter and try ARP spoofing.

Are there others?

Some vectors would include:

IP hijacking
ARP spoofing at the ISP where the requesting server is located
DNS poisoning
Any attack at the remote endpoint where the server is substituted, from ARP spoofing and private routing attacks all the way to physical replacement of the server


Does disabling right click have any impact on security? On a banking website I see that they have disabled right-click. Does that make the site any more secure? Is it a good general practice?

Does it make the site any more secure?

No, it doesn't alter anything other than your ability to conveniently save items from a page. Using a browser's developer mode, turning off JS, overriding this with a different script that disables that pop-up, or just grabbing data off the wire after stripping the SSL will all work.

  Is it a good general practice?

This is an ache that the Internet has had to suffer from the height of GeoCities fame when folks didn't want you to "steal" their very poorly composed photos of dandelions and family pets. Dispensing all professionalism and being straight-forward as possible, I might hesitate to convict a person for smacking the responsible party of any modern site using this upside the head with a cast iron skillet. Aside from that it has generally fallen out of favor due to being a combination of ineffective and annoying. For instance, it would also make my spellchecker misbehave.


Why is Tor safer than a proxy? If I use a Tor router to browse the regular internet, my traffic must leave the Tor network through an exit node. Apparently the exit node can see the data originally sent.

Is this true?
If an adversary wanted to deanonymize me, wouldn't they just have to subpoena the exit node owner or hack it?
Does this mean a proxy is about as safe, since the above applies to both?

In Tor, the user (you) chooses a random path through several nodes for its data. The first node in the path knows your IP address, but not what you send or where. The last node ("exit node") knows the target server address and sees the data (unless SSL is used, of course), but not your IP address. Every node in the path knows only the addresses of the previous and the next nodes in the path.

If a government is intent on unraveling the privacy of Tor, then its best chance is to setup and operate a lot of nodes (which, of course, will not say "provided by your friendly government"). If your computer randomly chooses a path which begins by a government-controlled node and ends with another government-controlled node, then both nodes can correlate their data pretty easily and reveal both your IP and the target server (and sent data, if no SSL). Correlation is simple because while encryption hides the contents of data, it does not hide the length. If node A sees a 4138-byte request entering the Tor network from your IP, and node B sees a 4138-byte request within the next second exiting the Tor network and destined to server www.example.com, then node A and node B, by collating their data, will infer that your IP was involved with a communication to www.example.com.

It can easily be proven that if the hostile party does not eavesdrop on or hijack both the entry and exit nodes, then your privacy is maintained. But if they do, then privacy evaporates like a morning mist under the midday Sun.


SSL Handshake failure when antivirus is enabled This is a problem related to SSL handshake failures when an anti-virus (Kaspersky) is in between.

From WireShark, I am able to notice the SSL handshake successful (i.e towards the end client sending “Client Key Exchange, Change Cipher Spec, Encrypted Handshake Message” and the server responding with “Change Cipher Spec, Encrypted Handshake Message”. After this the client initiates a FIN and closes the connection.

But when my anti-virus is turned off or if I disable the "Scan encrypted connections" setting in Kaspersky, I could see the client SSL connections are all successful and the client is able to send data.

I would appreciate if someone could explain this behavior and how I can bypass this without changing my customer's anti-virus settings.

Check "Scan encrypted connections" option
It seems Kaspersky does SSL interception (Man in the Middle).

Kaspersky KB entry 6851: SSL connection scan by Kaspersky Anti-Virus version 6.0.4.x (Archived here.)

I would appreciate if someone could explain this behavior

Some clients may use certificate pinning. And those can not be easily Man-in-the-middled by using a different certificate. Try turning SSL interception off.
(Please tell me what clients these are! I'm curious.)
From Certificate Pinning:

One way to detect and block many kinds of MITM attacks is "certificate
pinning", sometimes called "SSL pinning" but more accurately called
"public key pinning".[229] A client that does key pinning adds an
extra step beyond the normal X.509 certificate validation: After
obtaining the server's certificate in the standard way, the client
checks the public key(s) in the server's certificate chain against a
set of (hashes of) public keys for the server name. Typically the
public key hashes are bundled with the application.

Just to clarify, this isn't an attack.  The man in the middle performed by Kasperky is used to scan HTTP traffic for malicious web data.  This is what they mean by Scan Encrypted Connections.

how I can bypass this without changing my customer's anti-virus settings

I don't know if this is possible. Depends on the client software. Google Chrome for example will not enforce pins for locally added CAs. (Archived here.) This is explicitly meant to allow SSL/TLS interception. Some other client software may not be so lenient.
Further reading

Sec-SE: Kaspersky Antivirus “secure connection scan” as broken as Superfish?
Hanno Böck, 2015-04-26, How Kaspersky makes you vulnerable to the FREAK attack and other ways Antivirus software lowers your HTTPS security (Archived here.)


Access Flags for Handles The handles window in process Explorer has a column Access which supposedly determines the access rights of that particular handle. I am not able to get any documentation on how to read the flags and what each bit means. Any resource to point me in the direction would be very helpful.

I believe you can find those defined in winnt.h.  (A sample winnt.h which seems to match correctly can be found included in the Wine project.)  The lower 16 bits are context-dependent (eg. they are interpreted differently depending on whether the handle is for a file, a threat, a process, etc.)

The bit patterns can be further described in MSDN.


When changing a password using a WebPage, must the old password be entered on the same screen? There is a convention to always prompt for the old password on the same page as the one where the old password is being changed as shown below.

Is it acceptable from a security perspective to allow a user to log in, and then change the password on a separate page that doesn't require the old password?

I'm asking because I'm trying to streamline a mobile application, and am considering making the standard web application have the same workflow.

Example of an "annoying" workflow for the user:

User authenticates
User is notified PW is expired or must be changed (immediately)
User is directed to the screen below.  The additional prompting for "current password" is annoying and I wonder what benefit it provides...

The reason you're made to enter your current password when you choose a new one is to ensure that the person doing the changing is the "real" account owner.

If you can directly change your password once logged in, the following attacks are possible:

You walk away from your computer for a moment, I go to the website
and change your password
I steal your login cookies, load the website as you, and change your password

Edit: If you're suggesting the following sequence: Login using old password, then the next page immediately prompts for a new password, then you probably do have the same level of protection, assuming the "change" screen times out after some time.

I don't think it matters how many screens the process takes. I think the key is that the shorter the duration between when you can be sure the "real" owner interacted with the site, and when the password change request is issued, the greater the security.

Since you can set the elapsed time to zero by putting the old and new password fields on the same page, with (IMHO) little change in UX, that's probably why it's often done that way.


Does information security justifies Iphone 6's "error 53"? An update of IPhone 6 software left several IPhones that were previously repaired by an non-certified phone repairer dead. See e.g. this news.
Apple claims that this is due to security:

A spokeswoman for Apple told Money (get ready for a jargon overload): “We protect fingerprint data using a secure enclave, which is uniquely paired to the touch ID sensor. When iPhone is serviced by an authorised Apple service provider or Apple retail store for changes that affect the touch ID sensor, the pairing is re-validated. This check ensures the device and the iOS features related to touch ID remain secure. Without this unique pairing, a malicious touch ID sensor could be substituted, thereby gaining access to the secure enclave. When iOS detects that the pairing fails, touch ID, including Apple Pay, is disabled so the device remains secure.”
She adds: “When an iPhone is serviced by an unauthorised repair provider, faulty screens or other invalid components that affect the touch ID sensor could cause the check to fail if the pairing cannot be validated. With a subsequent update or restore, additional security checks result in an ‘error 53’ being displayed … If a customer encounters an unrecoverable error 53, we recommend contacting Apple support.”

I wonder: Is it the case that this is a potentially serious security issue? Is it so serious that the best course of action would be to block the device altogether?
Disclaimer: I do not own an IPhone nor Apple shares, it is just curiosity.

There are two questions here I think.

The first, is it so serious that the best course of action would be to block the device altogether?

Well, let me start by asking a question. How much do you value your fingerprint data? What about your Apple Pay data? As you are a non-Apple user, Apple uses this "secure enclave" to store this data. When you enroll in Apple Pay, your information is stored in the secure enclave. When you enroll in the fingerprint sensor, your information is stored in the secure enclave. By allowing an untrusted device to access this information, it can be leaked and stolen to unknown parties. To mitigate that, Apple has elected to block untrusted sensors altogether, which is how this secure enclave is accessed.

This covers the basic tenants of security: Don't trust user input and default to fail closed.

The second question, does the means justify the ends? That's a question you, as a user, need to ask yourself. Consider the risk of having very sensitive information stolen, versus saving some money on repairs. I can't answer that question for you, but I can hardly blame a company for taking a hard line on protecting very sensitive information.


Is it secure to install RSA SecurID Software Tokens on the same computer that will be used to access the VPN? My office switched from using the old hardware RSA SecurID key tokens to the RSA SecurID Software Tokens and most users have them installed on the same machines they use to access the VPN.

I asked our security people (which I respect) and they told me that it was fine.  The Two Factor Authentication consists of the "Something you have" the PC itself and the "Something you know" your password to get into the PC and the PIN for the soft token.

It seems to me that having both on the same device effectively comes down to a two part password.  You type your username and password (some steps in the middle) and your PIN. Having a single password, even if it is in multiple parts with the RSA software in the middle, is single factor authentication.

In all fairness, the disks are encrypted so bad guys cannot easily break into the system so we are pretty safe but everybody thinks they are safe.  That is the idea behind making things difficult for bad guys.  What is the point of going through the motions of two factor without implementing it correctly?

I have looked and looked on the web and the only thing I can find is the RSA web site where they say everything is fine with their product which is what I would expect them to say.

I would appreciate some compelling arguments that anybody can make, one way or the other.  If you could provide a link to something solid that I can wave in their faces and say "THERE! I told you so!" that would be great. If you have something solid to show me I am barking up the wrong tree, I will be pleased to accept that as well.

I should add that the way the RSA software works is I type in my PIN "12345678" and it responds back with its encoded value "31415926" which changes every minute.  If I type anything except for my PIN, it will act exactly the same but the code it gives will not allow authentication.  If I have a key logger on my system, it will record the PIN as entered and the bad guys will be able to break into the VPN, provided they have access to my system.  If they were to clone my machine and did not apply the work SensePost applied in their test they would be able to access the VPN if they had the PIN.  RSA maintains that everything is swell in their response.

The good news is the disks on our machines really are encrypted, I checked.  The bad news is we don't have to enter a password to boot so the encryption key is stored on encrypted disk.  The Sophos SafeGuard web site says the key "is split into different parts and stored in the ... kernel."  This sounds like "security through obscurity" to me. If a determined adversary were to log my keystrokes and steal my machine, they would have access to our VPN.

No, it's not fine, obviously. One of the benefits of 2-factor authentication using RSA tokens is the fact that even if the attacker installs a keylogger on the victim's workstation or is able to dump memory of the user's processes, that information will not be sufficient to allow the attacker to authenticate with user's credentials, as a one-time password generated on a different device is required for the authentication to succeed.

If the software tokens are running on the same system, then a simple memory scan will reveal the tokencode and allow the attacker to authenticate on the user's behalf. The attacker can additionally copy the provisioned RSA secret and generate the tokens themselves.


What type of exploit is an attacker performing by executing the code snippet? I just started on secure coding.Does anyone know what type of exploit is an attacker performing by executing the code snippet?

They're trying to execute shell commands through SQL injection. The SQL Server xp_cmdshell system stored procedure lets the executor execute a shell script, and return the script's output as row data.

So if this attack would succeed, the output of that web page would (granted the column would be printed somewhere directly) display something among the lines of:

  Pinging 10.10.1.2 with 32 bytes of data:

And the attacker would know this particular attack works, and work their way through more resourceful scripts to execute.


Why does Windows have a place to store intermediate SSL certificates? As I understand the process of verifying a remote computer's SSL certificate, the remote system sends its 'leaf' certificate and any intermediate certificates, but not the root certificate.  Executing this openssl command shows that the root certificate is not sent by the remote server:

openssl s_client -showcerts -connect www.stackoverflow.com:443

It is then the responsibility of the client to check that the leaf certificate was indeed signed by the first intermediate certificate, that the first intermediate was signed by the second and so on.  Ultimately, the signature on the last certificate provided by the remote system is checked to verify that it was signed by a root certificate that was already trusted - i.e., already in the 'trust store'.

So here's the question: why would you, as the client, ever want to store an intermediate certificate?  The Windows certificate store has an area designated for storing "Intermediate Certification Authorities".  What is it for?  Is there ever a case where storing intermediate certificates is needed?

I believe your understanding is correct.  I think Windows stores intermediates because:

1) Having local copies of intermediate certs allows it to "cope" with connection scenarios where the remote server is not chained properly. I've seen scenarios where a web server isn't configured properly but IE doesn't complain.

2) The certificates are used for other Windows-based tools.  For example, when analyzing a certificate with the Crypto Shell Extensions program, there's a "Certification Path" tab which tries to show the full chain (not ALWAYS accurate IMHO).

3) It allows the workstation to perform server-based SSL roles if needed (for example if you were to install some local software that had a web interface).

4) It potentially allows Windows, IE, or anything else leveraging the cert store to have a trusted reference point for cert pinning.  I'm not sure to what extent Windows actually does this though.


How does subresource integrity actually help? Subresource integrity basically lets me know that a resource I'm about to download is valid, because the hash of its contents matches what I expect.

But this assumes that I'm already running on some trusted and verified code. If a hacker has compromised the server serving resources, then they could easily just replace the root resource with hashes of their own malicious code (or just bypass integrity checks altogether).

So how do subresource integrity checks help at all? And how would a client go about verifying the root resource?

Subresource integrity is not about protecting your own code of the web application against modification. What SRI is intended to do can be seen from the  description of the goals:

  Compromise of a third-party service should not automatically mean compromise of every site which includes its scripts.

Thus, it is about protecting your use of resources located at sites which are not under your control. SRI gives back some control even if code from a third party site is included. It does not offer availability but it offers integrity, i.e. protection against unwanted modifications by the third party (or some hacker which took over this party).


Avoid third party access to system I need to go through airport security and customs, and its known that at least the German customs (http://en.wiktionary.org/wiki/Bundestrojaner) (and I suspect others as well) try to upload software to the system.

So here my question:

How can I make sure that nobody tempers with my system while I do not have physical access to it (they usually take it backdoors to "inspect" it), or verify it has been accessed / changed?

I have installed a BIOS password, but in a hard case they could just unplug my harddrive, and do something directly. The other option I thought of was doing a MD5 sum over my complete HDD, but as soon as I reboot, that sum will change most likely.

How can I either avoid to have a system, to which I might lose physical governance over temporarily, have a Trojan / Virus / something installed, or otherwise notice an intrusion?

Law #3: If a bad guy has unrestricted physical access to your computer, it's not your computer anymore.

For example, using TrueCrypt can't protect you from a determined attacker who has installed a hardware key logger and is reading everything you type.


FIDO and FIDO2 differences I've been reading both FIDO and FIDO2 specs for a while tring to understand the similarities and differences between both. Here is how I broke it down so far:

FIDO: First iteration in creating a cross industry  standard for passwordless / 2fa experience (with UAF and U2F)
FIDO2: Second iteration (with CTAP and Webauthn)
U2F: specifies a Javascript API and a HID protocol for FIDO
CTAP: specifies a HID protocol for FIDO2
Webauthn: specifies a Javascript API for FIDO2

Do you think this is accurate? Any other information you think is useful?

You are right except for few points to let me break it down for you.

FIDO: First iteration in creating a cross-industry standard for passwordless / 2fa experience (with UAF and U2F) ---> Yes you are right about but remember FIDO 1.0 never achieved standardization

FIDO2: Second iteration (with CTAP and Webauthn) --> Partially right about FIDO2.0. It comprised of WebAuthn (the Browser API) W3C standard and CTAP2 (the authenticator API) (formally known as U2F/CTAP1) and also FIDO Alliance relabeled U2F as CTAP1. Quite confusing but yeah we have to live with it.

U2F: specifies a Javascript API and a HID protocol for FIDO --> Yes you are right

CTAP: specifies a HID protocol for FIDO2 --> Yes you are right. CTAP is like client-side protocol to establish communication with external security keys.

Webauthn: specifies a Javascript API for FIDO2 --> Perfect


anti-CSRF tokens in HTTPS environment Does it really make sense to use anti-CSRF tokens in a web application that is accessed by HTTPS only? If yes, then what are the possible ways to attack such a web application if anti-CSRF tokens are absent?

Yes, it does make sense. HTTPS does nothing to protect you against CSRF attacks. You would carry out an CSRF attack like you would against a HTTP enabled website.

Take a look at the CSRF description from OWASP to understand how it works. It will be obvious that the encryption of the communication channel is irrelevant for this type of attack.


unknown user on my router Recently i noticed that there is an unknown user connected to my modem. I tried to block the mac address by accessing router page(192.168.1.1 ,dlink modem) > parent control > macaddress filter > put the mac address of (unknown user) > apply. but they are still using my wifi. This leads to slower internet . even youtube is slow now. So what should i do? google search lead to this link https://security.stackexchange.com/a/137316/149263 and after reading this, i am sure that someone is stealing my wifi. i just want to block the user . is there any way to block the user permenently?

there is also one thing to notice that the mac address of unknown user is similar to my device (only 3/6 parts are different). if 01:02:03:04:05:06 is my mac address then the mac addr of unknown user is 01:02:03:0a:bb:cc. i will provide screenshots if required. sorry if its offtopic here.

Additional to the already provided answer I'll point few things out and a TO-DO list

Start by getting him off your network.

Turn off your Wi-Fi.
Change your router admin password.
Change the security to WPA2. *
Disable WPS. **
Change the SSID (Network name) ***
Change to a long password easy to remember. ****
Use whitelist instead of blacklist. *****

*If your modem is old, then it might not have WPA2 personal, try WPA instead. (History note: WPA2 needed a hardware change from the old WEP standard, while WPA just needed a firmware update)

**If your router is old WPS have many vulnerabilities, and there's no need to have it available, just connect your devices the normal way.

***Maybe he already have pre-generated keys for the SSID you're using, changing the name would render useless the space-time trade off he previously did.

****You got 63 ASCII, use 3 or 4 four words, add spaces (generally spaces aren't common in charsets), special symbols are hard for humans to remember but easy for computers to "guess", so use only one.

*****Add your three devices - This will eventually render useless as previously stated that spoofing MAC is easy.

Whit all this, the bad guy would have more homework:
With no WEP he can't capture/break WEP weak IV's, with no WPS he can't use wash/reaver to get the PIN or pixie dust attacks, etc. With WPA/2 he needs to capture a handshake (now WPA) from any of your devices, bruteforce it (hence the long password-This maybe will take months-years depending on the length), then eventually when trying to connect he will spoof any of your MAC address and then he's in. Hope this helps in any way.


Good book about general methods of exploit I suppose that a lot of users hate this type of 'noob' questions, but I really eager to become a Cyber Security specialist and I need a little advice.

As for now I'm learning Networking/Routing & Switching basics, ANSI C and ruby languages. Also I'm an experienced Linux user, so I have basic shell scripting skills and general understanding of Linux architecture.

But after all, I still feel myself as nobody when it comes to some hacking/exploits stuff. Does somebody know a book that would give me a solid understanding of types of exploit without overwhelming me with a practical matters (I'll study them later separately)?

P. S. There are a lot of books of such kind all over the Internet, but I would rather read the one experienced people would recommend.

As I understood from your comments, you want to learn web application security. I would recommend reading web application hackers handbook. This book explains many web application vulnerabilities with simple language yet it goes into detail with each one of them. Also it has really useful "hack steps" which explains how to conduct an attack in detail with real world examples. For a side note, writers of this book is also the  creators of Burp Intruder which is very famous attack proxy among the security researchers.


Can an authoritative DNS server tell who is trying to resolve a domain name? Let's assume my domain example.com has ns1 record pointed to a random IP address 192.0.2.111.

When somebody tries to resolve example.com, can the dns server at 192.0.2.111 see what IP is trying to resolve that domain name?

Not exactly. Keep in mind you won't see requests from systems which either have the dns info cached or are using a dns server which has it cached. Likewise if you have someone visiting or attacking your site who is using an external dns server the dns query will likely come from the IP address of the dns server they are using and not the visitor/attackers IP itself. So you will see the query itself but it may come from a public DNS server.


Bash function manipulation explained I was recently reading through a write up on a capture the flag Linux VulnHub machine. For privilege escalation, the author references 'bash function manipulation'. A Google search turns up very little on how this works. In short they run strings on a root SUID binary like so:

Then the author proceeded to create/export a bash function matching one of the programs called by the program (namely, "/usr/bin/sl"), like so;

My main question is, how does this work?

It's obvious to me the end result is getting the binary to run the bash function/code and thus the root shell, but it seems like magic. I wonder what the conditions to reproduce are. For instance, in this case;

Could you use "/dev/tty"?
What about "puts"?
How about /usr/bin/aafire? Why or why not?
Would it still work if the "nightmare" program just called "sl -al" without the FQ path?
Does it matter what kind of binary/ELF the root SUID file is?

If this attack known by another name that would be helpful to know as well as Google is coming up short on this one.

EDIT:

I just ran across this related walk through, which breaks down and analyzes some of the code of the (root SUID) "nightmare" binary. However it leaves me with more questions, then answers, such as why does the "train()" method set the UID and GID to  0 (root) before calling "/usr/bin/sl -al", when the "nightmare" binary is already a root SUID?

If it doesnt do this, does this mean that "/usr/bin/sl" would fail to run as root? If thats the case, then is it fair to say this is a contrived privilege escalation scenario that is unlikely in the real world?

What do setresuid() and setresgid() do?
In order to better understand this example, we need to have a look at these two functions and the three parameters they take.
From this answer (and the credentials(7) man page):

On Linux, each process has the following user and group identifiers:

Real user ID and real group ID. These IDs determine who owns the process. To summarize, this is who you are.

Effective user ID and effective group ID. These IDs are used by the kernel to determine the permissions that the process will have when accessing shared resources such as message queues, shared memory, and semaphores. On most UNIX systems, these IDs also determine the permissions when accessing files. However, Linux uses the file system IDs for this task. To summarize, this is what you can do.

Saved set-user-ID and saved set-group-ID. These IDs are used in set-user-ID and set-group-ID programs to save a copy of the corresponding effective IDs that were set when the program was executed. A set-user-ID program can assume and drop privileges by switching its effective user ID back and forth between the values in its real user ID and saved set-user-ID. To summarize, this is who you were before.

Further, it's important to understand the SetUID-Bit. What this does is it runs an executable program with the rights of the owner, not the one who calls it.
A security nightmare
Your question specifically mentions that nightmare is owned by root and has the SetUID-Bit set. What this means is that any user who is allowed to execute nightmare essentially executes it as root. This means that all child processes of nightmare - such as they are spawned when calling system() -  are also executed as root.
But really now, what does setresuid() do?
In this context? Nothing. Since the user is already executing things as root, it doesn't affect the further exploitation in any way.
Could you use /dev/tty?
This question does not make much sense in this context. You have to look at the relevant code snippet to see where the string /dev/tty is coming from.
if (open("/dev/tty", O_RDWR) != -1) {
        fire();
        rax = sub_4008d0();
}

This means the program is trying to open /dev/tty for reading and writing and if that succeeds, calls fire().
By naming a bash function /dev/tty(), you do not get the desired results, as open() requires a path to a file as its first parameter. It's completely independent of bash and has no concept of bash functions.
What about puts()?
Similarly, this doesn't make much sense. strings isn't a magic and doesn't understand context. All it does is look for series of bytes that are printable ASCII characters.
puts() is just a C-function which outputs a string.
What about /usr/bin/aafire?
While I didn't personally try, it seems as if practically /usr/bin/aafire could have been used instead of /usr/bin/sl -al. If this is not correct, please comment and I will edit this part.
Would it still work if a relative path would be used?
Yes, actually even better! system() internally calls sh -c, which has to resolve the $PATH variable to find sl. If the path variable was modified to include . or any other user-writable directory with higher priority than /usr/bin, then I could just symlink ./sl to /bin/bash.
Does it matter what kind of binary/ELF the root SUID file is?
Yes, because the SetUID-Bit gets ignored on shell scripts. It must be a native executable.


Security risks of typing wrong password I accidentally typed my root account password on my google account login, I know google keeps their website quite safe but this question came in mind: Is there a risk if you accidentally type in another password in another websites login page?

I would guess the risk in this particular situation (Google services) is quite minimal, but you're always taking a chance when you enter the password of another account into a third party service. This is because it is unknown as to what they do with that data. They could do nothing, or they could data mine, sell, attempt to log in to other known accounts, and/or otherwise run analysis on passwords entered there.

There are a few things to consider, for example if the username of the two accounts in question are not the same it adds a layer of obfuscation to the mix. What username would they use to log in to your account on another service with out more information about you and your online presence? How would they find the right service to use the correct combination of username and password?

When to be worried? I would worry if I were using the same username on multiple online services where I didn't particularly trust their origins (think sites like hackforums.net).  If you're doing something like this it could be easy for a black hat owner of the service to do some recon on your username by way of Google "hacking" or namechk.com and trying your passwords on your accounts.


What footprint iOS or Android App leaves? and how to change it I've read some place that each phone and/or sim leaves some kind of footprints when it uses a social app (Google, Instagram etc.).

I would like to stay anonymous or at least blend in with the crowd.
How can I achieve this?

Native apps (unlike websites in a browser) is able to directly access many unique IDs that identify your device/SIM. There's no way to change these unless you root/jailbreak and even so, apps may come up with ingenious ways of fingerprinting still.

If you don't have to use the apps frequently, you can try the device emulators provided by Apple/Google.


Close Port 587 - Ramifications? Our recent PCI scan failed because "Plaintext authentication is allowed over unencrypted channel on SMTP." As such, our tech support suggested to close port 587.

What are the effects of closing port 587, and will it negatively affect sending/receiving emails?

TL;DR: If your users are using 587 to submit email for relay, you need to secure it (by requiring STARTTLS before AUTH) or disable it in favor of an alternative like 465 (SMTPS).  If none of your users is using 587, of course, you can disable it without concern, as all normal mail flows through port 25.

There are three commonly used ports for SMTP email - 25, 465, and 587.

25 is the standard SMTP port which is used by mail transfer agents everywhere.  If that goes away, you will stop getting email from the rest of the world.

465 ("SMTPS" or "SSMTP", where the extra "S" stands for "Security") and 587 ("submission") are alternate ports which speak SMTP, designed for use by a more limited pool of your own trusted users.  To quote RFC 4409:

This separation of function offers a number of benefits, including
the ability to apply specific security or policy requirements.

So, historically, these ports were use for things like allowing Mail User Agents to submit mail for relay, where the main SMTP port does not provide relay services. (In fact, 465 and 587 were introduced as a way of restoring functionality once "open relay" was closed off on port 25, which was itself a security measure.) Some other form of control (network ACLs or SMTP AUTH) are usually used with 465/587 to ensure only legitimate submissions are accepted for relay.

465 (SMTPS) is, like HTTPS, wrapped in SSL/TLS at the network layer.  587 does not require encryption per the RFC, but in common practice, nowadays many configurations will require STARTTLS (spinning up SSL/TLS during the SMTP transaction) before SMTP AUTH is even advertised.  That specifically addresses the concern that your PCI scan is raising.

If your 587 (submission) port is like that, you may apply for an exception to the PCI scan.  You can prove this by telnetting to port 587 and entering the command "EHLO hostname".  If the response you get, like this one, includes STARTTLS but not AUTH, then you are not vulnerable to what the PCI scan thought you were:

EHLO hostname
250-submission.server Hello hostname [192.168.3.4], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 16777216
250-DSN
250-STARTTLS
250-DELIVERBY
250 HELP

If it does offer AUTH while unencrypted, you will need to either require STARTTLS before AUTH or disable 587 and use something like 465 over SSL/TLS instead.

If you don't have Mail User Agents which belong to your domain submitting mail over the network for relay, you don't need 587 or 465 in any case.


How do I know if a Certificate Authority is not fake? Recently I detected this CA on my phone:

It shocked me that the CA itself is called "Packet Capture CA" and so much information are blank.

Why does Android allowed such weird CA to exists?

Question is is there a official list of CA where I can verify its authenticity?

PS:  For safety reason, I have immediately deleted this CA from my phone - but while doing this, I saw so many other CA with different weird names.

This CA is installed when installing the Packet Capture app from the play-store.

It's very likely that you've imported this Certificate yourself by installing the app somewhere in the past.

Further, there is no reason at all for Android to block any CA Certs based on the "weirdness" of a name. And it doesn't really make any sense to me why it should, as names can be chosen freely...


What is the Point of Spam Registrations on New Wordpress Site? I asked this over in the Wordpress Developers site and no one had a clue. There was a suggestion I should ask here.

So, I know why spammers create posts with links on Wordpress sites--they do it for SEO purposes.

But why would you spam register dozens of identities on a web site that doesn't even have a blog; that is, no where to post comments that could contain links?

Since installing a Wordpress site I've had about 30 or so daily fake registrations since the site went live. Knowing why people are doing this might help create a strategy to stop it. But I can't figure this out.

Anyone have any ideas?

a web site that doesn't even have a blog; that is, no where to post comments

Most-likely, the spam bots simple don't know this.

Setting aside how poorly developed spam software generally is, how would a bot know for sure there is nowhere to post spam once registered?

For example, what if the comments are only available to registered users? The spam software would need to register to know for certain no comment system becomes available once registered.

Sure, it may be possible to determine if the blog feed is enabled or not to some degree of certainty, but WordPress also makes comments available for pages if the theme supports it. So if the site has any pages, there is a possibility there will be comments to spam.

Other possible motives exist as well. Perhaps they want to find the server's real IP address (which may be obscured by something like Cloudflare), by getting the server to send an email. Or perhaps there are some exploits in WordPress or some plugins which can be exploited once registered.


Where can I find good dictionaries for dictionary attacks? I’m wondering where I can find good collections of dictionaries which can be used for dictionary attacks?

I've found some through Google, but I’m interested in hearing about where you get your dictionaries from.

Nice list collected by Ron Bowes you can find here:
http://www.skullsecurity.org/wiki/index.php/Passwords.

Other list is from InsidePro:
https://web.archive.org/web/20120207113205/http://www.insidepro.com/eng/download.shtml.


Block Packets in snort In rules configuration of snort I have:

alert tcp any any -> any any (msg:"HTTP Connection"; react:block;)

However when I add:

alert icmp any any -> any any (msg:"HTTP Connection"; react:block;)

it gives me a error that react is not allowed for ICMP.

Is there any other way to enable this?

How can I block packets in snort?

Snort does not block packets.  Snort is an intrusion detection and prevention system.

The React rule option is intended to be used with TCP connections.  The react keyword, when it matches, will generate multiple reset packets to both end of the connection to shoot it down.

Since ICMP is a datagram protocol that operates at the network level, there is no way to "shoot it down."  If you'd like to block these you really need to use a firewall. :)


If a thief has the phone in their possession, how can Password Recovery be implemented securely? Standard password recovery involves sending a password reset mechanism to the user; either to email, sms or telephone call. However, if a phone has been stolen the thief has full access to these services, making the use of such a service not especially secure.

Memorable questions etc are not ideal, because they can be guessed (especially as the thief theoretically has access to Facebook where such data can be found).

Biometrics are not really there yet either (not all phones have fingerprint records) and facial recognition is easy to game.

What is the best option for providing password recovery for a mobile application, working on the assumption that the thief has access to the users other services?

If you consider that a device is compromise, you cannot do anything that relies on sending information to the device.
This includes 2 factors authentication (SMS, or app) and emails.

The only option you have left is to base the account reset on the user knowing something (master password, security questions), or meeting face to face with said user (provided you can authenticate him physically). Alternatively, standard post-mail could be used if you have your client's address validated.

Today's applications do no bother to do this, since the client are always virtual and the only thing that ties someone to his account is his email address. This is why portable device protection are necessary for the user and there is nothing more a service provider can do to avoid this.


What's the correct term form a pre-computed table with password/hash pairs? The table looks like this:

123456 -> asfty18u78t489yh
password -> 89y203rupdifhof
something -> 2r892389n89rfsd

And the idea is that if you have the hash (asfty18u78t489yh), you know the password that generated it (123456).

I have seen them called "hash tables" in here, but other sources define a "hash table" as a cryptographic method for indexing arrays. I have seen the term "pre-computed hashes" or "pre-computed hash tables" but only in a few posts/websites. I have also seen some other weird terms and even some confusion with terms (e.g. calling it a "rainbow table" or a "dictionary attack") which may actually be correct but I have no idea.

What is the correct (or, at least, generally accepted) term?

If there are the entire hashes for each password it's a pre-computed hash table, in a security context it's usually called just hash tables.

If you have a strcture such as:

End of hash1 -> Password1, Password2, Password3, ...
End of hash2 -> Password4, Password5, Password6, ...

Then it's called a rainbow table, the main difference here is that you group all the passwords that produce hashes that have the same ending (For example, the last 32 bits of sha256). This is done to save some space at expense of computing time, in this case you take the hash you are trying to crack, look at the ending and try the passwords you have associated to that hash ending

Finally, hash tables (AKA Hash maps) in the context of general computer science is a data structure that uses a hash function (Not necessarily a cryptographic hash function) to store, order and/or access data in an array. It works like this:

k = Hash(object.id)
Array[k] = object

When you want to search an object in the table you just get the Array[Hash(object_id)]

There are also certain hash maps that allow multiple values for the same hash (In case of collisions), in this case each entry in the array is a linked list


SSL Certificate in my hosting makes me change my java code? Sorry for my stupid question. But I really want to know what is gonna happen..

I have a webservice hosted over the http protocol.

I wanna buy an SSL certificate to have my webservice hosting with the https protocol...

Problem is, I have an Android application that is already connected to the web service (the web services is in my hosting with http).

The question is: if I buy an SSL certificate and my hosting pass from HTTP to HTTPS, will I have to change my java code? It will try to change the connect to my server at http://hosting.esy.es/action.php to https://hosting.esy.es/action.php when the app try to connect to http by default the server redirect to https?

Because this makes me to change al my http to https in my java code.
If i don't have to change in my code because automatically redirect to https, I already have security pipe?

Thanks for understand me!

If you enable SSL/TLS on the server side, the client has to be able to "speak SSL/TLS" too. Otherwise, the connection will end up being reset.

Just changing a web-service to use "https" does not auto-magically change all applications communication encrypted. This is a shared protocol. If I suddenly goes speaking French but you only understand English, communication won't happen. This goes the same way for TLS.

If you enable TLS server side, you will have to modify you apps so that they can also use TLS. Fortunately for you, java has the means to deal easily with TLS using some already defined classes. Just look it up.

On the other hand, you can provide both TLS/SSl enabled traffic for the web (https url) and leave the simple http open as well. So that you can have your website using TLS and your app HTTP only. Then you can proceed to migrate your app over TLS before shutting down your HTTP only channel.