You’re right, that is a dilemma.  I’ll try to answer point-by-point.

  I collect the CC data on the frontend and pass it to a Node application which sends it to our 3rd party service. ... However I am being told that passing the data from one application to another is against compliance,

It’s not so much passing data that’s non-compliment (after all, you need to pass it to the 3rd party) as passing it through your server that’s the problem.  I like to describe PCI levels in terms of what would need to be compromised in order to steal card data. If the answer is “my webserver” or “my application”, they you’re under SAQ-D, the most onerous. If the answer is “my communication channels with a trusted third party”, then you are probably A or A-EP, like most ecommerce.

  This is required because the API key/secret should not be exposed to the client for obvious security reasons. ... from the browser which would mean each person using the app would have the API key/secret being sent to their local machine and if known someone could easily use this to access our payment instruments.

This isn’t as obvious as you’d think. What can someone actually do with these credentials?  If all they can be used for is to give you money, they’re not really that sensitive. If they can be used to refund it, they’re critically sensitive. If they can be used to retrieve information that isn’t the PAN, that’s important but not as bad.

This is a big reason why the API credentials are almost certainly not what you log into their portal with. You may also have a different set for non-payment operations.

In the end, you should talk to your payment provider. You’re not the first person to have these issues, and they may already have guidance on how to handle it.  (If you are the first... run!)

Many payment systems I’ve seen ask the server to make some kind of setup call, using secret credentials, which then returns a one-time-use value (url, transaction key, etc) to be delivered to the client. Others just restrict what you can do with those creds so they’re safe to expose to the user.

It’s also possible you’re using the wrong API/endpoint. You might be using one intended for in-person payments, and there’s a different one for ecommerce. I’ve seen that too (and made that mistake myself).


How does DTLS use a CBC cipher if the application data is not reliable over UDP?

The paper http://crypto.stanford.edu/~nagendra/papers/dtls.pdf describes how DTLS explicitly implements sequence numbers, and uses explicit IV, so ciphers normal TLS CBC are supported.


I feel that ignoring would be the wrong thing to do, but I'm not sure what to do.

If you feel that ignoring this is wrong, look up the bank's phone number from a reputable source, e.g. yellow pages or the banks actual website. Call them, and ask. Or submit a contact form on their website, or similar - in short, contact them through a channel not related to the e-mail and ask them to verify the content.

Do not use the links in the e-mail.

If it's identity fraud, they will be very interested to clear it up. If it's phishing, banks tends to like to be made aware of ongoing phishing attempts, so they will not be angry with you for calling.


Why does Firefox (version 71.0 (64-bit)) indicate “weak encryption” but Google Chrome (Version 79.0.3945.88) does not?

... does "weak encryption" have anything to do with whether the browser trust the certificate? Has it got anything to do with the signature algorithm or signature hash algorithm?

The weak encryption has nothing to do with the certificate:
The hash algorithm used for the certificates signature is SHA-256 which is perfectly fine. The signature is also done with a RSA key of 2048 bit (can be seen in the intermediate CA, which is not shown by you) which is also perfectly fine.

Instead like said in the other answer the weak encryption refers to the use of TLS 1.0 with a CBC cipher. Note that unlike Chrome Firefox does not use RSA key exchange with this site but instead DHE (the cipher is TLS_DHE_RSA_WITH_AES_128_CBC_SHA), so the information regarding the weak key exchange in the other answer does not apply to Firefox.

To determine what exactly Firefox considers weak I was trying the same cipher with the same length of the DH parameters (1024 bit) as used by the original server but changed the TLS version. It looks like with TLS 1.2 Firefox 70.0.1 considers the encryption strong and only when disabling TLS 1.2 it considers the encryption weak since it now has to use TLS 1.1 or TLS 1.0.


Could a home PC get hijacked if the said PC is in a private network, with dynamic IP and behind a router that doesn't have ports forwarded?

If your question really is "is it even possible?" then the answer is yes.

Your primary concern with that setup is client-side attacks.

If malware infects your PC, it could start a reverse shell. Your firewall can combat this with egress filtering, but it is tricky nonetheless. Even ICMP may be used for reverse shell communication, or the traffic may be encrypted or obfuscated. Or the malware may simply exfiltrate your data to a remote server.

You may unwittingly install this malware yourself. Software you already use like a browser or browser plugin may have a vulnerability that could be exploited, e.g. drive-by-downloads.

Defences are numerous. You can keep your software up to date, only install trusted software and use your judgment when browsing. Furthermore, you can run anti-virus software. Of course, there are many, many measures you can take.

In order to decide what action to take, consider the risks and your threat model. Ask questions like:

What's at stake?
What level of risk am I comfortable with?
Am I defending against random or targeted attacks, by whom?


Ring signatures would require modification of the OpenPGP standard and it's implementations, so you won't be able to use them while staying compatible. In fact, there was a propsal in 2014 on the OpenPGP IETF mailing list, but I couldn't find any further follow-ups towards an RFC.

To achieve a similar effect without ring signatures (and the effort of setting up a group), OpenPGP already knows the concept of "group keys", in the end it boils down to setting a key flag indicating the key is shared among a group. From RFC 4880:

5.2.3.21.  Key Flags

   (N octets of flags)

   This subpacket contains a list of binary flags that hold information
   about a key.  It is a string of octets, and an implementation MUST
   NOT assume a fixed size.  This is so it can grow over time.  If a
   list is shorter than an implementation expects, the unstated flags
   are considered to be zero.  The defined flags are as follows:

[...]

       0x80 - The private component of this key may be in the
              possession of more than one person.

I'm not aware though whether this flag can be set without fiddling with GnuPG's source code and compiling GnuPG on your own.

By sharing the key, user's will not be able to determine who signed a message. By signing all group member's keys with the group key, you can publish the list of possible signers.

Do not share the primary key but subkeys if you want to be able to escrow keys more easily (so if somebody leaves the group, all certifications from and on the key stay the same, but you can revoke the old subkey and only have to distribute a new signing subkey to everybody). You can also prevent the rest of the group from issuing certifications or generating/revoking new subkeys on their behalf at the same time.


Read the document:  https://www.pcisecuritystandards.org/documents/PA-DSS_v3.pdf

On page 7, there's a table that outlines what you can and can't store.  If your legacy system only stores the allowed data, then you can theoretically get compliance, but you'll have some really really really strict security requirements for your network and systems.

IMO, it's just not worth it to do your own CC transactions in-house, unless that's your primary business.


The site tells you which specific breaches it found your email address in. There are a few reasons a given breach might expose your email but not the corresponding password:

The breach might not have contained passwords at all. E.g. spam lists.
The breach might not have contained passwords for all the accounts it had, maybe because:

it comes from multiple sources
the person submitting the leak to HIBP didn't have access to the whole list/is holding onto some of the list
or the source protected some passwords better than others (e.g. Ashley Madison)
some passwords were just too strong to crack the hash.


Best practices for TrueCrypt + Yubikey combination

It's 161,700 combinations if the order of the files doesn't matter. If the order of the files does matter it's 970,200 combinations. But even 970,200 combination isn't enough against a committed adversary.

Let's say I have your Yubikey and USB stick but don't know the combination and want to brute force the combination. The TrueCrpyt encryption key derivation function runs SHA-512 on the password a thousand times so for 970,200 combination I would need to run SHA-512 ~1 billion times which would take ~10 seconds to do on a current generation GPU. Not very hard.

If you could increase the number of files to 10000 and use 5 files then (assuming the order of the files matters) you'll have almost 10^20 combinations which is probably good enough for this purpose, at least for the next few years until Moore's law catches up with you.

Even that might not be good enough if your adversary is the NSA, GCHQ or the like. So you may want to go with 100,000 files and use 6 of them for a grand total of almost 10^30 combinations which is equivalent to a 100 bit key and probably has more entropy than your current 50 character password.

Having said that it's not clear to me what you gain by re-inventing the wheel instead of using some off-the-shelf two factor authentication (or even three-factor authentication).


Does nmap help to know if firewall is turned on?

How to test firewall rules

One of the most important aims of these scans will be to verify and test that your firewall filters and rules are performing as intended. To do this, you need to run a scan to look for ports that appear open to the outside world; then check whether they are filtered or not. A simple Nmap firewall audit scan would be something similar to:

nmap –v –sA –n www.yourorg.com –oA firewallaudit

The Nmap TCP ACK scan (-sA) will establish whether packets can pass through your firewall unfiltered. To speed up the scan, the –n option can be used to prevent reverse DNS resolution on the active IP addresses it finds. I would also use the –oA output option so you create a searchable file as well as an XML file to use for record keeping and reporting. You can use these output files to review the traffic flow through any unfiltered ports and then modify your firewall rule sets where necessary.

One mistake many administrators make when allowing traffic through their firewall is trusting traffic based simply on its source port number, such as DNS replies from port 53 or FTP from port 20. To test firewall rules, however, you can use most of Nmap's TCP scans, including the SYN scan, with the spoof source port number option (--source-port or abbreviated just to –g). By providing the port number, the network mapper will send packets from that port where possible. The following example will run an FIN scan, which will use a spoofed source port number of 25 (SMTP) and save the output to file firewallreport.txt. Now you can see if a particular port is allowing all traffic through:

nmap –sF –g 25 –oN firewallreport.txt www.yourorg.com

Another worthwhile check is to test a firewall's ability to cope with fragmented traffic. Malicious hackers often split up the TCP header over several packets to make it more difficult for packet filters and intrusion detection systems to detect an attack. While fragmented packets won't get past packet filters and firewalls that queue all IP fragments, many devices have queuing functions disabled by default to avoid a drop in performance. Simply adding the -f option will set a scan that uses fragmented IP packets.

When auditing your firewall, option –r will scan ports in numerical order, making it easier to follow the traffic flow when examining the Nmap output files. However, when you're testing the effectiveness of firewalls and IDSes, I would use a randomized port order, which is the default option. You can also randomize the order in which hosts are scanned by setting the --randomize-hosts option (–rH.) The randomization, combined with slow timing options, which we'll look at in a moment, will make any network monitoring devices work hard to detect the scan. Here's an example that could possibly test your network defences:

nmap –sS --scan-delay 500 –f –rH firewallreport.txt www.yourorg.com

Once you have identified any unfiltered ports or other issues, you should review and update your firewall rules to ensure access to all services is controlled and filters and rules are performing as anticipated. If you do make changes to your firewall, rerun the audit scan to ensure your changes have achieved the desired effect. It's also a good idea to run this type of audit scan on a regular basis to ensure your firewall configuration has not been modified unexpectedly.

Nmap includes a variety of timing options that allow you to modify almost every scan aspect. The "scan-delay" option (above) causes Nmap to wait the specified time between each test it sends to a given host.

The default setting keeps a scan going no matter how long it may take to complete, but this can be overridden with the Host Timeout option --host_timeout. The option sets the amount of time a scan will wait before aborting a scan, giving up on the host, and moving on to another IP address. This setting can be useful when scanning network devices over a slow connection.

Reference: How to manage firewall testing using Nmap


I'm not using SSL, what could I do to increase security on my website?

Setup an SSL certificate!
That's really the only answer here, especially if you are having people login.  An attacker on the same network as your users can sniff everything, and an attacker who gets themselves in the middle can modify your response to remove any client-side protections you try to enable.  I'd say that trying to secure a non-HTTPS connection is like trying to build a house without a foundation, but it's more like trying to build a sandcastle on a sandbar that is only exposed at low tide and covered in 10 feet of water at high tide.  It's literally impossible.
These days you can easily get free certificates from let's encrypt.  If your hosting company can't support SSL then it is time to move to a new one.  Moving to a new company will be easier than trying to build privacy without HTTPS.
As a software provider though
If you are providing software and so are not responsible for deployment, and thus cannot provide certificates, then attempting to secure an HTTP connection is an even more dangerous approach. The problem is that if you say "We provide X safe guards so HTTPS is unnecessary!" your customers will believe you, and when your safeguards are inevitably breached you will be held liable. Don't do it. I have had to deploy a lot of 3rd party software systems so here are the sorts of things you want to do:

Give suggestions for ways that they can add SSL via infrastructure, by doing things like putting a load balancer on top and using it for SSL termination. Most cloud providers can automatically provide SSL for their own load balancers.
Provide a way for the end user to provide an SSL certificate which your software will use (do them a favor and make sure there is an option to automatically configure your software for automatic deployments)
Provide some pre-baked options for automatic certificate management via Let's Encrypt/certbot.


Why two key DES algorithm provides only 80 bits security

To understand what happens with Double-DES, consider the meet-in-the-middle attack (completely unrelated to "man-in-the-middle attacks").

Setup: there is double-DES, where a data block is encrypted with key K1, then again with K2. The attacker could have access to two plaintext/ciphertext blocks: attacker knows A, B, C = EK2(EK1(A)) and D = EK2(EK1(B)).

Then the attacker can compute all EK(A) for all values of K (there are 256 of them). Then he can also compute all DK'(C) for all values of K' (again, 256 keys to try). At that point, he will have about 248 candidates for the (K1,K2) pair: these are all the pairs (K,K') for which EK(A) = DK'(C). The "248" comes from the fact that we are encrypting 64-bit blocks, so about 1 block value every 256 is one of the EK(A) values, so about 1 value K' every 256 will yield a matching DK'(C).

The 248 candidates can then be tried with the plaintext B and ciphertext D; it is expected that only the right one will pass that test.

Cost: 257 invocations of DES (plus an extra average of 248 for the verification of candidates, but that's negligible), and some memory storage able to hold 256 intermediate values, and sorted. Since the values are sorted, each will differ from the previous by only 8 bits on average, but it must also store the corresponding K, so let's say that a practical implementation would use 10 bytes per value. That's then 10*256 bytes of storage, which is rather large (about 650 thousands of terabytes) but can be envisioned with existing technology (it would not be cheap, though). The sorting step would be the biggest cost in an "academic" way (about 264 comparisons) but the 257 DES invocations would still be, in practice, more expensive.

I don't see any "80 bits" here. In fact, security of Double-DES should be considered to be close to "57 bits". The storage requirements make it harder to break than a simple "57-bit block cipher", but nowhere near as hard as an 80-bit block cipher.

(A similar method works for 3DES, which means that 3DES has security "about 112 bits" despite its 168 bits of key.)


Security of carrying passwords on person

The saying about passwords is that if you can remember it, it's not complicated enough.

Why not keep the list of passwords in a dedicated password manager software like KeePass?
This will encrypt the file and let you generate very long and randomized passwords for each and every site. You can carry both the software and the file on a USB stick instead of a piece of paper, the single master password to decrypt the file is the only thing stored in your head.


Should the MEID, PESN, IMEI1 and IMEI2 numbers be kept secret?

There is no real security risk.

Those numbers displayed each represent a serial number of a certain piece of hardware. Cellular networks mostly use IMEI to track a stolen phone and put it on a blacklist.
There for no attack is exposed unless someone would get your IMEI and add it to a blacklist (very unlikely).

What you should worry about is your phone that is being accessed by someone else so take good care of that!


Deleted files still detectable with Wondershare RecoverIt

If you need the files deleted with any degree of confidence, while still being constrained to continue using the drive, you will have to abandon the possibility of preserving the OS installation that's on the drive now.
From there, you can simply use any disk-wiping tool (for an SSD, even a single pass of Random data in something like DBAN would be sufficient), as long as you do write something (other than zeroes) to every sector of the drive without deleting anything at all between writing the first and last sectors.
You may or may not be interested in trying the drive's native Secure Erase capability; if supported, it will provide drastically reduced risk of an attacker recovering the data, as well as causing drastically less wear on the drive (a big plus if you can't just destroy it because you intend to continue using it).

In the future, you should encrypt data at rest that you're likely to need securely deleted. It's much easier to simply dispose of a few encryption keys (especially when stored in an HSM, such as a smartcard or tpm, both of which generally support reliable deletion of the keys as a routine operation) than to do all the song and dance required to sanitize a drive, especially an SSD.


Is it possible to hack into secured wifi and download with bit torrent from my IP address?

Yes, it is possible to hack to your WiFi, even if you use WPA2.

There are different ways how to do it:

The faster is WPS Pixie Dust Attack (within some seconds),
the next is Reaver (some hours, also need enabled WPS),
and the slowest is the off-line Dictionary attack (days or weeks, or even never).

All depends on your security settings on your router (Access Point) and the uniqueness of your password, and - of course - of the the possibilities and the level of your attacker.

And, yes, then the attacker presents himself (for outer world) with the same IP address as you, assigned to you by your Internet Service Provider (as anybody in your family).


Is a normal user allowed to view site's CSS sheet

Yes, it is implicitly intended that clients will download CSS files and interpret it to figure out how to render a page. Whether that CSS is accessed automatically via a web browser or manually via a person does not really make any difference from a Security standpoint.

You should consider the content of a CSS file to be public information unless it requires authentication to access.


Computer, mobile or target site infected?

This looks more like your first Google link was actually an AdSense campaign, and the campaign itself had been subverted ("malvertising").

While Google strives to keep its campaigns free of evil :-), the market is so alluring that lowlife advertisers and outright criminals strive even harder to get their wares through, and squeeze the most out of the few hours' survival their campaign is all it's likely to get.

It has already happened (here too), several times.


What is torrent encryption and does it make my traffic anonymous?

Think of it like an underground fight club. Encrypting the traffic means nobody on the outside can see you enter or leave, but once you're inside, everybody there knows who you are and can monitor your participation.

This feature is really only useful if you have an ISP that blocks torrent traffic. Encrypting it means it doesn't appear to be torrent traffic, it's just an encrypted stream, but once you get past the ISP and connect to the swarm everybody else participating knows exactly who you are and what you're doing.


I was using DNSCrypt on my personal computer (linux). I uninstalled it, and now I'm getting errors reinstalling. I believe development on DNSCrypt was being abandoned anyway, because Cisco/OpenDNS bought it.

DNSCrypt is a protocol not a software. It has multiple implementations. The specific implementation you refer to is dnscrypt-proxy which was last updated 2 days ago. DNSCrypt is not related to OpenDNS.

  I was looking into BIND as a replacement for that, to choose my DNS and utilize DNSSEC

Bind is not a replacement for DNSCrypt. DNSSec does not encrypt DNS but only adds signatures to provide an authenticated response. Signing in DNSSec is done by the owners of the domain (i.e. the authority) whereas with DNSCurve the signing is done by the DNSCurve server (which is not the authority for the domain).

  I want to be able to use DNSSEC providers (https://dnscrypt.info/public-servers/).

There are no such thing as DNSSec providers. DNSSec simply works like normal DNS. Servers for the DNSCrypt protocol can not be used by normal DNS software.


I use a different mail for every service, like facebook@mydomain.com, google@mydomain.com etc. This way I can see who sells my data or gets hacked (poor adobe@mydomain.com; )). Also I don't have to change 50 profiles after one incident but only one.

To adress your problem with Office360: I made a catch-all adress on my domain, where all mails arrive, so I only have to get mails from one inbox. If I see too many spam from one adress I simply block it.

The bigger problem is sending mails. Some Programms offer to enter any sender-address you like, but I know Outlook doesn't. Here I personally use a selfhosted webmailer where I can send from what address I like. It may not be the simplest solution but it works great for me.

For some important comunication it is also possible to create a temporary account while it lasts and delete it afterwards. I still get the mails through my catch-all address but have only one to manage.

I use this system for many years now and I have to say I am very satisfied with it. Not only I get nearly no spam but I also like the fact that I can identify which services I can trust and which not.


As you say, you cannot change the settings of the router and it is not your device. So treat it as that: Not part of your network!

Buy yourself another router that connects to the one you are provided with using (preferably) a network cable or if not possible WiFi. Configure that to treat this connection as WAN (the Internet) and to create a different wifi network for you, where you connect your devices.

If you want, you can configure your new router to build a VPN connection and send all traffic through that. Downsides are, it costs money and latency and bandwidth are worse. You shouldn't send anything unencrypted via the internet anyway, so I would consider that optional.

The important part is:

None of your devices should be connected to the provided router and wifi, only to your new router.
your new router should see the network of the provided router as external network
a device connected to the provided network shouldn't be able to access any device in your internal network.


Get total, not unique, number of cracked passwords from John the Rippers output?

"NoLoaderDupeCheck" attribute in the john.conf file is what i was looking for.


Something similar to owasp for wifi/networks/desktop/servers/...?

There are many sites dedicated to these topics. There's the National Vulnerability Database, which has both CVEs, known vulnerabilities, and CCEs, configuration issues. https://nvd.nist.gov/

There's the NIAP program which covers a wide variety of products. https://www.niap-ccevs.org/Product/

You can look at the Center for Internet Security benchmarks, which also covers a wide variety: https://benchmarks.cisecurity.org/


First X characters of your password cannot be identical to your previous one

If it is meant to say, "the first X letters of the password are the same as the first X of the previous password", this is indicative of bad practice. For exactly the reasons you have mentioned.

The first X letters may be stored somewhere in plaintext, which is bad - if an attacker gets their hands on them, it makes a brute-force attack simpler.

Even if, as @Quentin points out in the comments, they only store a hash of the first X characters, this still makes it easier for an attacker. If attackers get access to this hash, they can brute-force the hash of the first X characters easier than the hash of the full password. After that, they've got the first X characters of the password - making a brute-force attack on the entire password a lot simpler.

However, as is pointed out by @hamena314 in the comments, maybe you are interpreting the message wrong:

  The most common reason for failure is that the first three characters of a password cannot be identical...

It may simply mean that the first three characters cannot be identical to each other.


Is advanced mathematics relevant to security beyond cryptography?

Yes, math is a tool and it can be useful in the realm of computer security.  A fair amount of math is required to obtain a degree in Computer Science, and hackers prey on software developed by computer scientists.

Algebra can be used to fool GPS, and detect doctored photographs.

Computer Science theory is a branch of math and has applications to security.

There are also Algorithmic Complexity Attacks which is an attack pattern rooted in algorithmic analysis.


Application level security...won't I end up just duplicating TLS?

Usually, when people say that they don't want TLS but something called "application-level", then the raw, naked truth is that they don't know what they are blabbering about.

Mind the "usually", though: there are situations where TLS is insufficient, and something else is needed and is to be applied at some level which can be dubbed "application". Main case is when some client has to send requests with some sort of enforceable responsibility; in short words, when requests must be signed so that, should problems occurs, the request could serve as proof during a trial. TLS does not do signatures; it uses signatures internally, but only for authentication. The client can be sure that it talks to the right server (and also vice versa, if client certificates are used), but it has no proof which could be convincing in the eyes of a judge.

Of course, people who require "ALS" but cannot give decent specifications are unlikely to be aware of such subtleties. They are probably just applying some piece of dogma that they do not understand. To counter that, do as they ask: implement some Application-Level Security which consists in exchanging "messages" as "sequences of bytes" which happen to be identical to what is described in RFC 5246.

This point has been made before, brilliantly, in an easy-to-grasp graphic format:

(I hope Scott Adams' lawyers will forgive me for quoting this remarkable piece of wisdom.)


Is it possible to block URL using manageable switch

I think the short answer to this question is "no".  Specifically switches work at layer 2. The content and data you're looking to block is at layer 3.  A switch that's "managed" or "smart" typically means the switch can be managed remotely (command line or web UI) and configured to participate in STP, VLAN, flow control and other layer 2 stuff.

All that said current trends are for network hardware manufacturers to pack more and more stuff into the routing hardware.  Some providers may be integrating some layer 3 functionality into their switches but the link you provide looks like a pretty basic switch to me.


AES-256 uses a key that is exactly 256 bits long.

Because the encryption requires a key of an exact size, 7Zip doesn't use your password directly as the encryption key.  Instead, it runs the password through a key derivation function to produce a suitable encryption key.

Since your password isn't used directly as the encryption key, its length doesn't really matter.  Rather, what matters is the password's "entropy", a measure of how hard it would be for an attacker who knew how you generated the password to guess what your password was.  If you used 32 random bytes, you would have a password with 256 bits of entropy, as would a password of 197 characters of grammatically-correct English gibberish.  Simpler passwords have lower entropy, and are easier to guess.

The key size of 256 bits puts an upper bound on the useful complexity of the password.  If, for example, you used 48 random bytes (or 300 characters of gibberish), an attacker could ignore your password and instead search for a shorter password, probably 32 bytes long, that produces the same key.


Truecrypt FDE and BSOD dumping physical memory to disk - possible data leak?

Most operating systems, including Windows, can be configured to write
  debugging information and contents of the system memory to so-called
  memory dump files (also called crash dump files) when an error occurs
  (system crash, "blue screen," bug check). Therefore, memory dump files
  may contain sensitive data. VeraCrypt cannot prevent cached passwords,
  encryption keys, and the contents of sensitive files opened in RAM
  from being saved unencrypted to memory dump files.

https://veracrypt.codeplex.com/wikipage?title=Memory%20Dump%20Files

This is no different for TrueCrypt.

As the links shows, memory dumps can be disabled.


Is there an XSS vector for hidden input fields without using the HTML accesskey?

Unless you can inject to change the type (e.g. to text), then there is no known vector to trigger XSS within a hidden input field without further user interaction.

e.g. With

<input name="[INJECTION]" type="hidden" />

You could inject

" type="text" onfocus="alert&#x28;'xss'&#x29;" autofocus="1

to render

<input name="" type="text" onfocus="alert&#x28;'xss'&#x29;" autofocus="1" type="hidden" />

However, unless you can get in before the already set type="hidden" or close the tag and start a new one (which you can't in your case due to filtered >), you're snookered.


is copy pasting sudo password from opened document a possible vulnerability?

You're correct that if you were compromised an attacker could potentially still capture your password regardless of whether you typed it into a notepad or just into the password prompt. The issue here is that writing it into a text program may write it to disk, allowing it to be retrieved later. Writing it into the prompt should only write it into memory.

For ease of use I'd suggest using a password management tool such as Keepass or 1Password. There are many out there, but they can save your passwords and also generate random passwords for you.


Does running Windows XP pose a security threat to the whole internal network?

There is nothing specific to XP that poses a threat to other machines on the network. The fact that it can be controlled by a malicious actor is the threat that it poses. With XP, this threat is more likely than with other operating systems and patch levels.

So, putting aside the specific operating system, the threat is that it can be used to pivot and allow an attacker to worm across the machines in the network. The risk of a malicious actor connecting their own attacking machine on the network is the same as a compromised machine under an attacker's control.

The defense is to segment the network and to harden the other machines on the network as if the network is hostile. A DMZ is one way of doing this, so is ZTN and microsegmenting.


what is a good public available iptables script for ddos mitigation?

Have a look at the questions on:

how a software application can defend against a DDoS attack
what techniques do advanced firewalls use

as the answers there will give some indication. Basically you can't do it in a device as the distributed nature of the attack means you need to have infrastructure which can cope, which is why DDoS protection services tend to be provided in conjunction with ISPs and depend more on active routing, path restrictions and upstream filtering.


SHA-1 deprecation and self signed internally used certificates

Self signed certificates are not affected.

With the ability to create a hash collision an attacker can create two certificate requests, one for legit.com and one for evilattacker.com, with the same hash. The certificate authority will then sign legit.com and the attacker can use the signature to create a valid certificate for evilattacker.com, and vice versa.

With self signed certificates, you control both the request and the signing, so this scenario does not apply. As long as you don't sign certificate signing requests that were created by people you don't trust, you are safe.

It is still a good idea to use newer hash functions for all your future certificates.

Edit: note that you are also dependent on browser behavior if you want to keep using SHA1 certificates.


What tools exist to crack, disable, and undo the effects of a malicious Linux binary?

What you are doing is called reverse engineering an executable.  It is not unusual for a person who is hard coding a password into source code (a horrible security strategy) to make an amateur attempt to keep it from appearing in the static data intact.  However, the password PAssw0rd may not be at all related to the actual one.  The various program responses are obviously intentional, so PAssw0rd may be a deliberate red herring.

Several tools are common in reverse engineering efforts.

The command "file" which takes the file path as the first parameter so you can determine (in most cases) what type of executable you have.
Disassemblers which show EXACTLY what the executable does but is difficult to read for those that don't write assembly code on that specific architecture or have experience with disassembly.
Decompilers like Boomerang, Hex-rays, and Snowman can provide some greater readability but they do not recover the actual variable names or syntax of the original program and they are not 100% reliable, especially in cases where the engineers that created the executable tested with these packages and tried to obfuscate the security further.
Data flow diagrams or tables.  I know of no free tool to do this automatically, but a Python or Bash script over the top of a text parser of the assembly output (which can be written in sed or Perl) can be helpful.
Pencil and paper, believe it or not, for jotting flows and ideas

A common approach is to hunt for two things in the decompiled or disassembled code.

Cryptographic functions, such as a hash or cipher algorithm
The user prompt for the password and the subsequent read of the
user entry

These are the two endpoints in the data flow.  You will want to back-trace from the place where the password enters the cryptography algorithms and forward-trace the user entry of the password, hoping to find where the two ends meet.

Once you trace the path between user entry and authentication components, you will be able to see the mechanism in between.  If the security was done correctly, it will be a properly created hash value and your attempt will end poorly, but I suspect, this being an exercise, favorable results will be possible.


If you can't find the entry point of the hackers, and a "third party IT company" can't find it either, consider hiring a professional security firm to investigate the attack.

This is not an appropriate forum for product or company recommendations, so please don't ask specifically "who" to hire.

I have found that people who present at security conferences often work for reputable security firms, so you could start your searches there.  Many places have regional conferences which might be better suited to offer you local assistance; there are national conferences, and even international conferences, all of which would provide access to many professionals.

Another approach is to contact your local law enforcement.  While they likely won't have the resources or ability to investigate the hack directly, they may put you in contact with a national law enforcement agency who might have more resources; they might also offer the names of reputable security investigators you could hire.


Which Rogers internet compatible router is most secure?

Instead of placing your trust in Rogers (or any internet provider), you can certainly take responsibility for your own security.  Purchase your own router/firewall appliance, and connect all your home machines to it.  Then connect your router to the Rogers router.  That way, even if your Rogers' router is compromised, the infection remains isolated outside of your devices.

Inexpensive routers are widely available.  And if you still don't trust them, you can purchase the kind that lets you replace its firmware with an open source alternative, like OpenWRT or Tomato.

While there may not be much difference between a Rogers router and a cheap router, keep in mind that most router attacks are perpetrated by attackers who are using robots to sweep millions of machines looking for vulnerabilities.  Once the robots find them, the thief enters the network and sees what they can steal.  If they break through your Rogers' router and find only another firewall, they may decide your system is not worth their time to attack.


Alice should definitely do this on her home PC and not on her work computer. It might be compromised by various spying methods by corporate IT. Also, when the corporate IT admins aren't grossly negligent, they wouldn't allow a TOR node to operate from within their corporate network anyway. A sufficiently configured corporate network doesn't allow workstations to connect to anything in the outside world except via the corporate HTTP proxy. TOR doesn't work under this conditions.
Many email providers do not allow registrations via TOR or other anonymizers to avoid abuse. But let's assume Alice finds one which allows this.
In order to give proper consultation, the consultant will need accurate information about what Alice wants to do, what technology they use and what their main problems are. Alice likely won't get around to send the consultant confidential documents from her corporation. She could try to anonymize them as good as possible, but when the consultant is smart, he might put together all the hints and be able to guess who Alice might be working for. This might be enough to deanonymize her and rat her out.
Alice should check her email client to make sure it is properly configured and doesn't leak any private information in the mail headers.
Attachments from untrusted sources can be dangerous. Alice would be well-advised to examine the attachments carefully and only open them with programs which are sufficiently patched.
Contrary to popular believe, cryptocurrencies aren't untraceable. Bitcoins and its many, many derivates have a blockchain which securely documents the transaction history of every single wallet. This makes it possible to trace accurately which wallet moved how much money to which other wallet and when. Then all you need to do to deanonymize transactions is to find out which wallet belongs to whom. The identity behind a wallet becomes easy to know as soon as the owner tries to convert cryptocurrency into real currency or vice versa, because this usually requires a conventional money transfer between a currency exchange and their private bank account. Another situation where a wallet gets compromised is when it is used to order physical goods which need to be delivered to an existing post address.


Is it easier to eavesdrop on Ethernet connection rather than WiFi?

The answer also depends on the physical aspect of the network configuration.

If your modem or router (or combo) is easily accessible by someone else, it is much easier to eavesdrop through Wifi, although like @VirtualJJ said, the communication is encrypted.  Because through the LAN with ethernet protocol the communication can be wide open for anyone to sniff, but the fact is you have to be able to hard connect to the network.

The wifi is more easily accessible, yes, but it is encrypted and through a strong password and perhaps extra care (SSID not broadcasting and limited power on your wireless some it does not reach much further than your appartment) it can become more secure.

BTW, VLAN is a virtual LAN which means that you can group nodes.  Usually you would group devices that need access to the same thing (same requirements) such as security devices (access control, alarm, cameras) or sales staff that needs access to a particular server.  You basically create different segments independently of the physical portion. (Very useful feature)


I run a service that tests people and organizations in their ability to spot and properly respond to phishing attempts.

You must let all users know that a test will be performed, even the CEO. This does not mean that you inform them then try to phish them right away. With a few days delay, people will stop being on guard against a test.

How this is done, and if this is done, needs to up to your organization's management and HR department. Even with warning, people will feel entrapped, targeted, and possibly bullied. Warning helps to reduce these feelings and your HR department will help you devise a way for people to express their concerns, if any.

No one can tell you if it is appropriate to do this in your organization but your management. Do NOT launch a test without authorization and approval from your management.


How to fix Path Disclosure Vulnerability?

The feature you need to disable is usually called "directory browsing", and the method for doing so depends on which web server your customer uses.

It is usually a simple configuration change. Look at these instructions for Apache and IIS, which are two of the more popular web servers. Every web server should have documentation that describes how to configure this setting.

Note that the customer may not have direct control over the application. Some applications automatically install a bundled web server, and some products are distributed as virtual machines. In these cases, the customer may be unable or unwilling to configure the web server directly.

If these cases, your customer may contact the vendor for assistance or ignore the finding.


Is it secure to use HMAC to pass a string to be verified?

It sounds like what you are wanting to implement is a signed URL, similar to Amazon S3 URLs. As long as your secret is strong and secure it sounds like a reasonable way to verify the email address in a stateless fashion.

At the moment you are only signing/hasing the PIN and this is an issue with your code. If I get a valid PIN/PIN_HASH combination for email address A from your service, I could still submit this valid combination with a new email address B and it would pass your verification test.

I would suggest a slightly different solution. Use a timestamp instead of the PIN and use it as an expirey date.

created_at = int(round(time.time() * 1000))
payload = email + "-" + created_at
hashed = hmac.new(key, payload, hashlib.sha1)

Then send the created time back to the server instead of the pin. This allows you, after you verified that the hmac signature is correct, to also check how old this request is and reject it if it is older than x minutes.

This still leaves you vulnerable to replay attacks within the time frame, which might be ok, if you check that the user does not exist yet and reject the api call if they do.

PS: without https you are still at risk that someone intercepts and steals this information before it hits your server. I would strongly suggest to use https (LetsEncrypt certificates are free and easy to get)


Juggling bus factor & separation of duties on a small team?

I haven't personally had to make this decision, though I do work in an environment where such separation of duties is implemented.

Are you the owner of this business or are you working for someone else?

Reason I ask is because realistically this comes down to a business decision. (barring the obvious infosec perspective of - "SEPARATE ALL THE THINGS!")

To find the answer, you need to ask yourself/owner/CFO this question:

  Is the cost to add more employees to implement separation of duties
  less than the amount of business that will be lost to clients who
  require such, or can you raise the cost of the software sold to cover
  the salaries of more employees without losing additional business due
  to the price increase?

If so, then you can add more employees without putting yourself in the red, financially.


Is it necessary to remove the primary secret GPG key from your laptop if it has full-disk encryption?

Yes

Although you have taken good precautions against loss or theft of your laptop, you remain vulnerable to electronic attacks. In particular browser-based malware could take control of your computer and steal your PGP key.

The point of using subkeys is that you keep the master key somewhere really safe - which is not your everyday laptop. There have been other questions on here about where to keep your keys safe. A popular suggestion was to print out a QR code encoding of your key, and keep the printout safe.


After much head banging I found the problem was with the VirtualBox software, Honeyd requires you be able to go into promiscuous mode.

By default VirtualBox does not allow this, you have to go into your virtual machine network settings and "allow all" from the promiscuous mode dropdown box, then it works fine!


Is Maltego the best forensic/intelligence solution out there?

By far the best forensic intelligence tool every made is GREP.  Oah don't, forget PCRE,  I can tell you from more than a decade of experience that a regular expression tool will be able to detect any pattern and any violation you could possibly need.

Google is good at "gathering information around the web".


I can't understand what you are asking, but has been asked many times here.  If you want to know how you should store your passwords; a modern strong keystrengthened cryptographic hash like bcrypt is ideal; at worst use something like sha256/sha512 with a random salt (different for each account) stored with the password.  This has been covered in many threads here.

As for how to think of a strong password, random passphrases are great, and diceware is an easy way to come up with one.  Also 10+ character long passwords with mix of uppercase/lowercase/numbers/symbols are sufficiently strong.  If you use many unique passwords (always a good idea) its helpful to use tools like keepassx to keep an encrypted list of your passwords associated with each site.

Remember never re-use passwords at multiple sites.  E.g., if you use the same password at your bank as some random webapp, you have no assurance t hat the random webapp isn't storing your password in plaintext (or near equivalent) and some admin/hacker there will someday try to use that password with other information (like your username) at places like your bank.


PHP - Is it safe to file_put_content raw HTML?

May I know this approach is it safe?

No, this is not safe as you're trying to strip tags. Rather than using a black list I recommend you'd use a white list approach. The white list defines which HTML tags users are allowed to use.

By only stripping <script> tags and the javascript on-events is not sufficient.

What will happen if I enter the following payload:

<scr<script>ipt>alalertert('xss')</scr</script>ipt>

Your code will detect the <script>, alert and </script> tags in my payload and remove it. The result will be (XSS):

<script>alert('xss')</script> and this will "pop".

Try not to reinvent the wheel here. I'm sure there are relatively safe scripts on the internet that can do this as you're not the first person to use functionalities like this. Have a look at http://htmlpurifier.org/ to get some idea's.

In addition, I'd recommend looking in to a secure PHP framework as a basis for your application to avoid other common security problems such as SQL injection and Cross Site Request Forgery.


1) What are suggestions on preventing this as a security risk? (perhaps owning the mongodb process by a user/group that not even sudo would a allow shutting down? i.e another unknown username/password combination that the hacker would need to brute-force crack?)

Defense in depth requires multiple layers of security. You are correct that an attacker gaining superuser access has broad access to your server, but appear to be trivialising the effort to do so. In your suggested scenario there are multiple serious security compromises: an attacker has access to your AWS credentials, the client  .pem file, and password-less sudo access. With this level of access an attacker effectively has full control over your AWS infrastructure.

A non-comprehensive list of proactive security measures to consider include:

Lock down the default ec2-user SSH account so it can only be used locally or from a limited set of trusted IPs.
Update your sudoers configuration (using visudo) to avoid or limit password-less login. sudo access can be limited to  a subset of commands with or without prompting for the user's password. A NOPASSWD configuration for some or all sudo commands is a convenience but certainly not a requirement.
Limit SSH network exposure via firewall or TCP wrappers (see: Keeping SSH access secure).
Create an SSH account with more limited access for remote login.
Add monitoring/alerting for remote login attempts (successful & unsuccesful)

  2) Does using --auth matter at all (supposing i've already secured my database through the use-of public facing token-based end-points - because I don't want people sending usernames & passwords to my end-points. I see that as less secure than using a token)

Securing your public API end points is a related (but separate) exercise from securing your database. A real-life analogy might be: "if you have a lock on your front gate, should you also lock your front door or put your valuables in a safe?".

Having authentication & access control enabled is part of your defense in depth strategy and a first step in the MongoDB Security Checklist. If someone compromised your application server or another trusted network host, they should not automatically gain full access to your database deployment. Access control can also prevent some application logic errors: for example, ensuring your API is limited to CRUD operations and cannot be (ab)used to send cluster reconfiguration commands. You need to consider security between your end users and your API, your API and your database deployment, and all other aspects of your infrastructure. A good defense in depth strategy will include monitoring and intrusion detection so you are aware of when your defenses are being tested and potentially compromised.


This option looks for version strings Nikto doesn't know about and sends them to cirt.net:

  If the outdated Nikto plugin sees a web server it doesn't know of, or a version that is later than that defined in db_outdated, then it will send this information back to cirt.net for inclusion in future versions of Nikto. Server specific information (e.g. IP addresses or hostnames) are not sent.

Nikto manual

While it says Nikto doesn't send specific information like hostnames to cirt.net, there is always the possibility of a mistake such as custom version strings which disclose information being sent. This feature can be disabled in the configuration file.


This might not be exactly what you're looking for but...

Having your iPhone near your keyboard can make you vulnerable to keylogging.
Before you call me crazy, I've actually conducted this experiment using neural networks and an Android's accelerometer and it could 80% guess what region of the keyboard the key press came from and could guess within a few keys away fairly often.

Privileges for reading data from the accelerometer are given by default to both iPhone and Android devices, and so a device making use of these readings could potentially figure out when you type in a URL, what passwords you type into the webpages you visit, and combining the probabilistic regions of the key presses with a dictionary attack or a common passwords list would easily break passwords in minutes to seconds, no issue.


Why does pwdump7 retrieve LM hashes even though they're disabled?

In Windows 10 Anniversary update, Microsoft changed the encryption algorithm used for password hashes in SAM, the main difference being they switched the cipher used from RC4 to AES.

As pwdump7 is closed source and I wasn't able to find the date of its release, we can't tell for sure, but most probably it was never updated to be able to decrypt this newer encryption scheme, therefore the decrypted data is nonsense. Not only do you get fake LM hashes, but the NTLM hashes also differ from fgdump's output, so they are most probably also the result of wrong decryption and nonsensical.

You can find more information about the new encryption here: https://www.insecurity.be/blog/2018/01/21/retrieving-ntlm-hashes-and-what-changed-technical-writeup/


Purpose of using GUID for files along with underlying permissions checks

Because generating a new GUID is trivially easy, whereas keeping track of which was the last sequence number issued and making sure that the next one is issued only once (no multi-user timing problems) is much more difficult.

Also, a GUID leaks no data; a sequence number discloses the number of files being stored.


Server Infection: post-cleanup best practices

This question could be highly opinionated in terms of "best practices."

However, there may be certain industry/contractual or legal requirements for customer notification or forensic investigation. To get the optimal response, you will need to seek guidance for legal counsel specific to a given incident. In the general sense, you should do what is right and in the best interests of your customers/users, but if you are operating a business you may have to balance that with your desire to have a going concern.

A good general place to start would be with NIST SP 800-61: "Computer Security Incident Handling Guide". You may also want to see SP 800-86: "Guide to Integrating Forensic Techniques into Incident Response".

There are also some CERT/SANS/etc resources:

Cert Publications (e.g., Handbook for Computer Security Incident Response Teams)
Business-Person Simple Guidance
SANS Reading Room: Incident Handler's Handbook

Some references for laws and industry requirements (USA Specific Examples):

GLBA (Financial Inudstry): FDIC FIL-27-2005 Guidance, FTC Guidance
HIPAA (Health Care): HHS Guidance on Breach Notification Rule
PCI (Credit Cards): VISA Guidance(additional), SANS Paper on PCI Breach Response (Opinion/Research)
California Breach Notification Law: Legal Requirements (go to 1798.82.  (a))

This report by Congressional Research Service also provides a summary of some US federal laws. This Berkley Law Paper may also be of interest for US federal laws.


No certificate found alert in nodejs https server in mobile

Your server is requesting a client certificate from the browser. If you did not intend to do that, why do you have requestCert: true,?


Where else is IPSec used, besides with VPNs?

Well actually, it was primarily developed for IPv6 traffic. It doesn't have to be used for VPN's per say, but it is designed to be an end-to-end security scheme and can be used to secure communications for any application traffic across an IP network.

  Internet Protocol Security (IPsec) was originally developed for IPv6,
  but found widespread deployment first in IPv4, for which it was
  re-engineered. IPsec was a mandatory specification of the base IPv6
  protocol suite,[3][21] but has since been made optional.[22]

Source: Wikipedia


How should I set up emergency access to business-critical secrets in case I am "hit by a bus"?

My advice would be to remove the secrets from the drop-box and store them elsewhere.  Your instructions have to be easily human readable by anyone, but they can include instructions on how to get access to the properly secured part of the data.  That lets you separate the accessibility side of things from the security side.

Once you can think about security on its own, you can start to ask the real question of how much do you need to protect these keys?  This is a business logic question, so consult your management.  You might:

Have a password to a file that everyone knows
Have a file set up with multiple passwords so that each individual maintains their own copy.
Have a file locked by a M-out-of-N algorithm (the digital equivalent of requiring two keys to unlock a safe).
Have a M-out-of-N algorithm with one 'master' password required regardless of which group of individuals unlocks the file, and that one master is physically kept in a tamper-evident safe that you check every now and then.

Use creativity here.  Whatever you do, the decoupling of "instructions" with "sensitive information" frees you to properly safeguard the information, and then provide instructions on how to get that data later.

Your business logic decisions will also include uptime questions.  If something goes wrong in your life, how long does another admin have to take over your work before business is affected?  Consider how well replicated you want these instructions and sensitive information to be in case of server glitches.  When I was administering a server and needed to store instructions on how to restore it from backup, I used the server's own wiki to store that information for easy viewing, but obviously that wouldn't be so useful in a glitch scenario, so I also had a copy on the dev VM of that machine, saved off copies of it on 3 separate PCs and a printout.  I couldn't guarantee the printout would stay up to date, but I made sure that I could do my best.

This also points out something which is not always part of a hit by the bus plan: graceful degradation.  Not all hit-by-the-bus scenarios involve getting hit by a bus.  Some involve you just being inaccessible at an unfortunate time.  Some involve you leaving the company, but being available for a question or two.  Others... do not.  Consider layering the plan.  Small mishaps may be very well protected, while greater mishaps may still result in business loss while everyone gets things together, but nothing permanent.  To use my backup restoration plan as an example, the printed version was almost guaranteed not to be fully up to date.  But if lightning wiped out every computer for a city block, it was still more helpful than nothing.  On the other hand, if the server just thew a harddrive, and I had to restore from backup, the version I kept sync'd on the dev box was almost certainly up to date.

Example of this failing: I was a user on a network managed by KERBEROS by an admin that was distrustful of others and did not have a hit-by-a-bus plan.  When he... left, we had a hacking party to try to break his server.  In the end, our best impromptu hit-by-a-bus plan was to wipe the machines (every one of them) and start from scratch.  Note that, while this wasn't the best plan (in fact, I think its the worst plan?), the business kept moving.  We just got stagnated for about two days and had a bunch of grumpy customers.  In the words of Frank Herbert's Dune, "The spice must flow."  Even in the worst case (which may involve a curious incident involving your server's harddrive flung out of the bus and hitting you on the head, destroying all record of the hit-by-a-bus plan), business does have a way to keep moving... but I approve of trying to raise the bar a wee bit more than that!


Am I safe if browsing to /cgi-bin/ returns HTTP 403?

No, you can't conclude that from the 403 error.  If the server returns a 403 error for a directory, that just means you aren't allowed to list the directory contents, or that the directory has an index page that you aren't allowed to access; this is very common for cgi-bin directories.

You can, however, conclude that you are not vulnerable because there are no files in the /cgi-bin/ directory: any attempt to invoke the "shellshock" vulnerability will simply result in Apache responding to the attacker with a "404 Not Found" error.

You can (and probably should) disable CGI, but that's simply because disabling unused functionality is good security practice in general, rather than being in response to any specific threat.


Is copying & pasting to the clipboard vulnerable to keyloggers? (CTRL+C and CTRL+V)

From the MSDN page.

  The clipboard is a set of functions and messages that enable applications to transfer data. Because all applications have access to the clipboard, data can be easily transferred between applications or within an application.

Any applications can read data from the clipboard. A keylogger might not be logging such data, but it's definitely possible.


Securing servers in home network with https

Sure, this is a fine way to handle it. We've done the same thing at a previous job.

  How bad is it to assign local addresses to a public domain name?

Just because you have publicly registered your domain name doesn't mean the DNS for it also needs to be public. You can only add records on a DNS server that runs on your local network, and that will prevent an attacker from using DNS to learn a bit of information about your network topology and services running.


Predicting Math.random() sequence using V8's MWC1616 algorithm

That is a pseudorandom number generator.

So, yes, that's what all PRNGs do:

Given a specific seed, always produce the same sequence of only seemingly random numbers. That happens by initializing the internal state from the seed, and then, every time a number is generated, updating the internal state and outputting a number.

I've only superficially looked at MWC1616:

  The two generators have the form
     x(n)=a*x(n-1)+carry mod 2^16 and
     y(n)=b*y(n-1)+carry mod 2^16,
  in this case a and b are choosen as 18000 and 30903

Considering that it's mostly a linear algorithm, I'd say it should perform especially bad in terms of being able to conceal the internal state from reverse engineering.

I'd expect that algorithm to be bad in terms of quality, too. This can even hypothetically only achieve a sequence length of 2³² (so, easy to simply brute force the next number by going through all 4 billion in minutes at most values on a modern PC) albeit having 64 bits of state, but I'd be surprised if the sequence length was not actually shorter.

All in all, a very bad algorithm. What ancient library / programming language brought you this? If possible, consider using a different random generator (from different authors, tbh; "roll your own PRNG" is about as clever as "roll your own crypto") or different platform.


Is it a bad idea to ask for user e-mail and e-mail password?

What is your threat model? Who is going to try to steal the password and how?

If you run the application as its own user, and only that user can access that password file, and you trust root, then it's okay.

Ideally, the application would send from its own email account, so if there was a compromise, the impact is minimal (or customer can always create a new freemail account just for this app)

If you don't trust root (because you're running on AWS or similar), then you're not fine.

But we can't know until you tell us your threat model


Brute force MD5 with a prefix and suffix up to n characters/words

Hashcat lets you load a list of masks from a file - one mask per line.

[Edited to expand my previous too-brief answer above]:

Hashcat also lets you specify up to 4 custom character sets using the -1, -2, -3, and -4 parameters. Your specific custom character set (upper, lower, underscore) could be specified like so (I'm using "2" to make it obvious that it's not a lower-case L, but it could be 1, 2, 3, or 4):

-2 ?l?u_

You would then invoke hashcat something like this:

$ hashcat -a 3 [other options] -2 ?l?u_ [hashfile] [maskfile]

... with the mask file containing something like the following, with one line for each password length that you're expecting:

PREFIX_?2_SUFFIX
PREFIX_?2?2_SUFFIX
PREFIX_?2?2?2_SUFFIX
PREFIX_?2?2?2?2_SUFFIX
PREFIX_?2?2?2?2?2_SUFFIX
PREFIX_?2?2?2?2?2?2_SUFFIX
PREFIX_?2?2?2?2?2?2?2_SUFFIX
PREFIX_?2?2?2?2?2?2?2?2_SUFFIX
PREFIX_?2?2?2?2?2?2?2?2?2_SUFFIX
PREFIX_?2?2?2?2?2?2?2?2?2?2_SUFFIX

This lets you run the entire attack by only calling hashcat once.

Instead of specifying the custom character set on the command line, you can also specify them positionally in the maskfile itself, separated by commas:

?l?u_,PREFIX_?2_SUFFIX
?l?u_,PREFIX_?2?2_SUFFIX
?l?u_,PREFIX_?2?2?2_SUFFIX
?l?u_,PREFIX_?2?2?2?2_SUFFIX
?l?u_,PREFIX_?2?2?2?2?2_SUFFIX
?l?u_,PREFIX_?2?2?2?2?2?2_SUFFIX

... etc. This is sometimes preferable because it stores the custom character set directly in the mask file, instead of ephemerally on the command line - so that more of your attack strategy is persistently documented. (This can also let you specify different custom character sets on each line for each mask - which isn't necessary for your question, but can be very handy for other kinds of attacks.)


SHA-1 deprecation and self-signed certificates

The article you linked to is only relevant for CAs participating in the Windows Root CA Program, not self-signed certs.

Self-signed certs only work if you put them as a trusted CA root in OS or browser. These will continue to work indefinitely.

Windows Root CA Program certs signed with SHA1 are good to 1 Jan 2017.

1 Jan 2016 is the last issue day that SHA1 certs will be accepted. 1 Jan 2017 is when SHA1 certs, whenever they were issued, become invalid.

This is for SSL certs that are not on Windows Vista and Windows Server 2008. Code signing certs have a different schedule.

(Thanks to @bayo15 for comment about self-signed certs being different.)


What is the likelihood of getting sensitive information off of a backup tape?

Yes, it is very easy to retrieve data if you have the tape. The only challenge with older tapes is ensuring you have an appropriate reader. Once you have the reader you can easily work out what operating system and backup application write to the tape.

You must treat backups the same way you treat live data. If it is sensitive, use controls such as encryption.

From an attacker's viewpoint backups are often a soft target.


Can you use ssh for secure inter app communication on the same device?

You say "SSH is fast". It's not. It's fast enough for its intended purpose (remote shell access and occasional file transfer/sshfs) but it's definitely not fast enough for IPC, let alone efficient.

On a local machine there's never any need for encryption between processes. If an attacker can read what you're sending to localhost, he can most definitely read the entire memory and get the key to whatever crypto you're using.

You also need to consider battery life, adding (unnecessary) crypto will induce more CPU load and thus more power usage.


Centralized authorization with distributed service providers

Yes, there is a solution out there and it is even a standard. It is called XACML, the eXtensible Access Control Markup Language. Much like SAML, it is defined by OASIS. Where SAML focuses on authentication, federation, and coarse-grained authorization, XACML focuses on fine-grained authorization based on attributes and policies.

For instance, you can define policies such as:

A user with role == manager can do the action == view on a resource of type == medical record.

XACML defines the policy language, the request / response scheme, and the architecture. The following diagram shows the architecture. It has a notion of a Policy Decision Point (PDP) which is the authorization server which can be queried from multiple locations in your architecture e.g. a service layer, an API, or even a data tier.

Most XACML implementations give you a binary Permit / Deny API - also part of the XACML standard. The implementation I work on, Axiomatics, also gives you an open-ended API e.g. "What can Alice do?" which returns a list of permissions back rather than just a Permit / Deny answer.


The pwgen is a password generator developed by Theodore Ts'o, that is same person who create the /dev/random, and /dev/urandom for the Linux kernel.

  randomness

pwgen will seed from /dev/urandom, or /dev/random if they are available on your system.  See randnum.c.  I don't have refs, but I am very confident that /dev/*random has been reviewed for security problems.  Since it is critical too, and used by almost every cypto program on a typical linux system.

  Backdoors

The source code for pwgen is really pretty small.  I am not a security researcher by training, or trade, but I just can't see anywhere that you could hide anything like a backdoor, in a utility that simply returns a string of random random characters or phonemes.  There is no network access, there no writing to the filesystem that I see.  But feel free to look for yourself source.

  password strength.

I suspect the if an attacker knew you had used pwgen, and knew which options you used, and knew you used one of the options with the phonemes, then they might be able to brute force your password faster than if they attacker assumed your password that was completely random.  But that is true for most methods for generating passwords that people can actually remember.  Generating longer pwgen passwords should compensate.


How many bits of entropy does an identifier contain?

The entropy in a session identifier is the entropy of the underlying number source; a PRNG might yield good random words of 32 bits, each of them having 32 bits of entropy (however, as @forrest pointed out, entropy doesn't "carry" - it will grow until it reaches the size of the PRNG's internal state, and theoretically that state could be back-calculated given sufficient output. From then on, the PRNG output is predictable, with an entropy of zero. A "truly random" generator has an internal state of infinite size).

This means that each bit is more or less completely unpredictable (the 'more or less' stems from the PRNG being a (P)seudo random number generator).

When this 32 bit number is encoded in a string identifier, usually by hex encoding in ascii or utf8, it becomes something like "1A9F72EF". Now these are eight bytes, so 64 bits, yet they still contain the same entropy as before, which was 32 bits.

If we had used base64 encoding, our identifier would have had 6 bits of entropy for each character, i.e. 8 bits; so the entropy would be 3/4ths of the length in bits of the identifier (or the identifier would be 8/6ths the length of its binary representation).

That's where OWASP's "1/2" came from.

Now, the entropy of a source cannot be determined by observing a single instance; usually you need to know with a certainty how the source works. A random source is by definition pure entropy. A constant source (always returns 42) has an entropy of zero even when "42" is represented by six or eight bits.

Using a very rough and untrustworthy approximation, the entropy is twice the number of bits that change on average from one representation to the next, provided that the changes are random and nonrepeating. A sequence of [ 00FF, FF00, 00FF, FF00 ... ] would have all its bits changing, but there's only two symbols in the sequence, so one bit is sufficient to describe it fully; the internal state of the generator is one bit wide.

The big problem is determining whether a source is "truly" (pseudo-)random.

If you can trust SecureRandom (you probably can!), then yes, BigInteger(130, new SecureRandom()) will give you a number with 130 bits of entropy. You can encode it as a 260-bit hex sequence, or a 176-bit Base64 sequence.

Only be sure that the entropy pool feeding SecureRandom is refreshed frequently enough with some true randomness, or your identifier might become predictable. An (in)famous case is the Mersenne Twister, where having some 624 sequential values out of the generator allows recostructing the 19967 bits of its internal state via linear algebra, and thence predicting with certainty all its future values.


How do you limit javascript api to a domain?

I would check the origin header when the request comes in and confirm that the domain making the request matches the one you have associated with the key.

This means you would need to track the association between domains and keys of paying customers on your end so you could check this.

Keep in mind that the origin header can be spoofed if the request is made using something like curl, so while this would be a good defense against web pages using your API without permission, someone could get around your restriction for their own personal use.


Checking client hello for https classification

In SSL/TLS, messages are sent as part of records. What should be expected is that the client first send a ClientHello message which itself is contained in one or several records.

Record format is:

record type: 1 byte (0x16 for "records contains some handshake message data")
protocol version: 2 bytes (0x03 0x00 for SSL 3.0, 0x03 0x01 for TLS 1.0, and so on)
record length: 2 bytes (big endian)
then the record data...

For the first record (from client to server), the client will first send a ClientHello message which is a type of handshake message, hence encapsulated in a record as shown above (the first byte of the record will be 0x16). Theoretically, the client may send the ClientHello split into several records, and it may begin with one or several empty records, but this is not very probable. The ClientHello message itself begins with its own four-byte header, with one byte for the message type (0x01 for ClientHello), then the message length over three bytes (there again, big-endian).

Once the client has sent its ClientHello, then it expects a response from the server, so the ClientHello will be alone in its record.

So you could expect a payload which begins with the following 9 bytes:

0x16 0x03 X Y Z 0x01 A B C

with:

X will be 0, 1, 2, 3... or more, depending on the protocol version used by the client for this first message. Currently, defined SSL/TLS versions are SSL 3.0, TLS 1.0, TLS 1.1 and TLS 1.2. Other versions may be defined in the future. They will probably use the 3.X numbering scheme, so you can expect the second header byte to remain a 0x03, but you should not arbitrarily limit the third byte.
Y Z is the encoding of the record length; A B C is the encoding of the ClientHello message length. Since the ClientHello message begins with a 4-byte header (not including in its length) and is supposed to be alone in its record, you should have: A = 0 and 256*X+Y = 256*B+C+4.

If you see 9 such bytes, which verify these conditions, then chances are that this is a ClientHello from a SSL client.

Some non-very-recent SSL client may also support an older protocol version, called SSL 2.0. These clients will emit a ClientHello which follows the SSL 2.0 rules, where messages and records are somehow merged. That SSL 2.0 ClientHello message will state that the client also knows SSL 3.0 or more recent, but it won't begin with the 9-byte sequence explained above.

SSL 2.0 ClientHello structure is explained in appendix E.2 or RFC 5246. Although such clients are rarefying (there is a RFC about prohibiting SSL 2.0 support altogether), there are still many deployed out there.

Your code has a few problems:

It does not detect a SSL 2.0 ClientHello message.
It checks that the third header byte (X in my description above) is equal to 0, 1 or 2, which rules out TLS 1.2. This is too restrictive.
It assumes that the whole ClientHello will be in a single record (which is a reasonable assumption) and that this ClientHello will be encoded in a single packet (which is a much less reasonable assumption).
It does not try to look at the length in the handshake message and corroborate it with the record length.

Correspondingly, evading detection will be easy (by using a SSL 2.0 ClientHello, by using a record tagged with TLS 1.2 version, by making a big ClientHello message which does not fit in a single packet... the method are numerous); and some existing deployed clients will not be detected: not only one can avoid detection on purpose, but it is also possible unwillingly.


Why use a Smartcard for (Two Factor) Auth instead of another medium?

A smart card works by keeping a secret hidden and answering a challenge that proves it has the secret.  It, theoretically, should never reveal that secret to anyone and it should be unrecoverable.  There are some technical ways you might be able to get around it, but most of them are destructive to the card.  This means you know if your smartcard has been compromised.

An encrypted USB drive or memory card on the other hand can simply be copied.  There is no mechanism protecting it from being cloned by an attacker.  There are some USB sticks that do provide hardware protection to prevent unauthorized access and these would make a more viable option, but it would be a toss up as to whether even those were as well protected as a good smartcard.


How to securely delete a table in MS-Access?

All data lives in the mdb, so once you delete the table, the data is gone.

The backups are going to be the tricky part. If you are using Windows 7 Backup, then you cannot selectively remove data without making the backup potentially unusable for a restore (unlike other backup solutions).

I would delete all backups, remove the data from the Access database, then perform a fresh Full backup of the system. I would also look for any backup media that would have the old mdb files and delete those, as well.

If deleting old backups is not possible, I would encrypt and physically secure the backup media.

All this is assuming that the removal of the confidential data will not break the database or the application relying on the database. I, personally, would keep a copy of the current database before deleting and let the application run for a period of time to determine the effect of the data removal. Then delete the one-off backup once I was sure things ran as expected.


Would siloing passwords into their own locked down schema improve security?

The majority of the big password dumps are done with sql injection.  Isolating your authentication database from the rest of the program is a defense in depth strategy because you are planning on the fact that one developer may introduce a SQL Injection vulnerability.  The vast majority of SQL databases do not allow query stacking,  and should be difficult to obtain arbitrary remote code execution using SQL Injection.  Dumping the administrative password or other authentication credentials using SQL Injection (sqlmap rocks) is a very common attack pattern in the wild.

OAuth is an even better approach.  Google and Facebook are popular OAuth providers;  they not only have more users but more resources to devote to security.   A system is most secure when security threats are avoided entirely.


HTTPS uses Transport Layer Security (TLS). The Transport layer is layer 4, so everything above this layer is encrypted, which means all of HTTP is encrypted.

By default on most HTTP servers, all GET parameters are logged to the access log.   The plaintext logging of authentication tokens is a vulnerability.  The Authentication HTTP header is not logged by default.


A standard way to manually add a digital signature to a pdf file?

According to your comments to other answers, you actually want to

  sign a pdf file with [your] certificate, then have this signature saved and appended to the pdf [you]'ve just signed.

(BTW, you sign with the private key associated with the public key in your certificate, not with the certificate itself, but that's a detail.)

I assume you want to "append" the signature to the PDF in a way that a standard conform PDF viewer (e.g. Adobe Reader) will recognize, display, and validate as an integrated PDF signature.

In that case you already started wrong by signing the original PDF as is and expecting to now have to merely somehow append that signature to the file. Instead you have to build a new revision of the PDF document which includes a PDF AcroForm signature field whose value is a signature dictionary whose /Contents entry contains the signature of the whole new revision with the exception of the /Contents entry contents.

If multiple signatures are to be integrated into a PDF, this is done by means of incremental PDF updates (explicitly not by adding multiple SignerInfo structures to a single integrated CMS signature container!):

This is explained quite graphically and in more detail in the Adobe document Digital Signatures in a PDF. It furthermore is specified in the PDF specification ISO 32000-1:2008 made available here by Adobe in section 12.8 Digital Signatures.

Be aware, though! The specification says:

  A byte range digest shall be computed over a range of bytes in the file, that shall be indicated by the ByteRange entry in the signature dictionary. This range should be the entire file, including the signature dictionary but excluding the signature value itself (the Contents entry). Other ranges may be used but since they do not check for all changes to the document, their use is not recommended.

This seems to allow that you first create a signature for the original PDF and then append a new revision holding that signature indicating that range of signed bytes only contains that original revision, not the extended revision without only the signature.

In reality, though, PDF viewers (especially Adobe Reader) will only accept signatures which follow the recommendation that the signed range should be the entire file, including the signature dictionary but excluding the signature value itself.

Newer specifications, e.g. the ETSI PAdES specification ETSI TS 102 778 (cf. section 5.1 item b in part 2 and section 4.2 item c in part 3) even make this recommendation officially a requirements, and so will ISO 32000-2.

Depending on your programming context, there are many PDF libraries supporting the creation of integrated PDF signatures and also many products using these libraries. Some of them are even available for free subject e.g. to the AGPL.


How to reset Windows trusted certificates store to its default

Theoretically, you could apply the following method:

Delete all root CA certificates except the ones that are absolutely needed by Windows itself, as indicated here.
Install the current list of trusted root CA from the current package. Note that validation of this package requires that you still trust one of the "necessary" root CA, which is why you must keep them in the first step.

I emphasize that I have not tested this method. As a preparatory step, you may want to first make a backup of all these certificates: run certmgr.msc, open the Root store, select them all (e.g. with Ctrl-A), then right-click and choose to export them all as a PKCS#7 file. That file will contain a copy of all the certificates, which should allow you to repair things, if the method above fails in some way. There again, the recovery is untested.

Be wary of the multiplicity of stores. certmgr.msc shows an aggregate view containing certificates from various sources ("physical stores"). To understand what you are about to do, in the certificate manager, right-click on the Certificates node (root node of the tree in the left pane), select View then Options, and select the Physical certificate stores box. This process is described in this blog entry (with screenshots).


Should I worry about a breach where my password was not revealed?

The Patreon data included passwords hashed using the industry best practice BCrypt algorithm (this data is available online through a search for "patreon data dump", although possession of it may be a criminal offence in some jurisdictions, so I'm not linking to it). This does not mean that they are impossible to break, but they are relatively slow to break. Therefore, you should still consider the password as potentially compromised.

Specifically, the table data available through sources such as this reveals that a table called "tblUsers" contained a field called "Password", and that another table called "tblUnverifiedUsers" did too. Given the scale of the dump, it would be irresponsible to assume that this data was not accessed. The CEO of Patreon also provided a later statement to Motherboard stating "We encrypt all tax form information with a 2048-bit RSA key. The key used to decrypt this information lives on a separate server and was not compromised. All user passwords are hashed using bcrypt with 8 or 12 passes, depending on when the user signed up."

The idea of hashing passwords is to provide that buffer for changing details in the event of a breach - any password can be broken, given sufficient time, no matter what algorithm is used. After all, there has to be a way to compare the input from the user to the data stored in the database - the worst case scenario for the attacker is that they try every possible input string through the same algorithm, with the same salt, until they get the same output. The best case for them is that they don't need to bother doing that.

Assuming you are practising good password usage, you are probably fine - you've presumably already changed your Patreon login, and it'll be different to every other site you have. There isn't anything you can do about any of the other data though.


With physical access, so many parts of your network could be compromised. I'm not sure I would be looking at the cable and light, but at more basic things, like USB drives, rogue wifi access points, computers left logged in...


Why is Chrome saying that "TLS_RSA_WITH_AES_128_CBC_SHA (0x2f)" is an obsolete cipher suite?

Here's the definition they use for non-obsolete cryptography:

  In order for the message to indicate “modern cryptography”, the connection should use forward secrecy and either AES-GCM or CHACHA20_POLY1305. Other cipher suites are known to have weaknesses. Most servers will wish to negotiate TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256.

In this case the fact that there's no forward security is the main reason. CBC is also discouraged, due to the vulnerabilities caused by the dependence on proper padding and IV in some software.


How do you organize a code review / static analysis report?

I need to caveat this with - there are a million different ways to do this, and most organisations have their own. Most of my experience in global professional services firms aims to deliver these sort of reports to heads of IT Security, CISO's and Executive boards, so your mileage may vary. A quick summary:

First: think about your audience

If delivering to IT devs and support teams, all they are going to want is a prioritised list of issues, the steps to fix, and a link to the vendor description (eg MS KB page)

If delivering to heads of department, they will want a prioritised list with an estimate of risk and likelihood of exploitation, time to fix each one, and possibly issue owners (although that may not be your responsibility)

There are other audiences, but those two are probably the most common. So it is often useful to deliver a report that is suitable for both.

What I usually prepare is an executive summary listing why the work was done (eg for an audit), high level implications of the results (usually Red/Amber/Green indicators for the board) and an estimate of time to fix. This helps senior management prioritise budget and resource. Wording here needs to be suitable to take to the board if necessary, so no technical detail!

In addition I'll include a technical appendix which has the information the remediation team will actually need in order to make the relevant fixes. This may be as simple as an excel spreadsheet.


Why is encryption (or signing) of long lines in E-Mails with PGP problematic?

I can not make it  simpler than this:

  Essentially, the trouble happens when Enigmail attaches an inline PGP
  signature to an email in Thunderbird's HTML message composer. The HTML
  composer is a different component than the plain-text composer, and it
  performs some "clean up" on the message body after the user hits send.
  That is an obvious recipe for trouble, since it occurs after the
  signature was computed over the message. Any alterations, including
  those that are invisible to the user (such as white-space changes or
  replacing special characters with HTML character codes) will alter the
  hash value of the message, which is the element of the signature that
  is encrypted by the sender's private key.

  In this case, the alteration that happens to the message body is
  automatic line-wrapping. Thunderbird's line-wrapping for HTML messages
  breaks lines that exceed 79 characters (or whatever the value of the
  mailnews.wraplength preference is set to), so not every message is
  affected. In an attempt to avert this trouble, Enigmail performs its
  own line-wrapping on the message body just before generating the
  signature, at mailnews.wraplength - 2.

  Nevertheless, there are invariably some situations when a single
  "word" is longer than 77 characters; the simplest example is a lengthy
  URL. In these situations, the automatic line-wrapping Thunderbird
  performs after Enigmail has processed the message splits the long line
  at the mailnews.wraplength point when it is sent, therefore the
  signature no longer validates when the email recipient's PGP client
  checks it.


Web Attack: CCTV-DVR Remote Code Execution (Node.js - Swedish string.js URL)

Which uses the default http://127.0.0.1:8080/ address.

127.0.0.1 is localhost and not reachable from outside. If you would really only bind to this address then the attacker would not be able to connect to this server from another computer but only connections from your computer itself would be possible.

But the software you are using does not use the default address of 127.0.0.1 as you claim. To cite from the documentation:

  --port=NUMBER - select port to use, default: PORT env var or 8080
  --host=ADDRESS - select host address to bind to, default: IP env var or 0.0.0.0 ("any address")

Thus, it will not bind to 127.0.0.1 but to 0.0.0.0 by default. This means your server is reachable by default also from outside your own computer. To fix this you should

set --host=127.0.0.1 when starting the server. This will make the server only accessible from the local machine.
and better also enable firewall on your machine in case you have other services running which should not be reachable from outside.


How to forge Referer Header in GET method triggered on HTML

It's really straightforward!

Tip:

   The check verifies if the requesting URL contains the string localhost, but not if it starts with it. So how do you get the string localhost in the referrer (at any place)?

Solution:

   You need to send the request from a page that contains the target hostname in its URL. So if your DVWA instance is hosted on localhost, you need to embed that string in the URL. Just send the CSRF request from http://evilhost/?localhost. This will produce a referrer header like this:  Referer: http://evilhost/?localhost That's enough to pass the check.


What’s the best way to permanently delete data from your iPhone?

I don't think there is a way to actually scrub the data.
The recommended method is doing a factory reset. All the data will be left behind intact but the encryption key will be lost, so the data will be virtually irrecoverable. (Or as much as the key can be brute forced in a reasonable time frame)


How to detect hosts running in virtual machines with nmap?

You could use the Metasploit Framework HTTP Virtual Host Brute Force Scanner module.

Nmap is best launched from inside Metasploit. See the Metasploit Unleashed (free training available from Offensive-Security) section on Port Scanning for more information.

If the target IP address is available from the global Internet, then I suggest you also check out MyIPNeighbors and SHODAN, which are incredibly resourceful for this sort of reconnaissance activity.

Identification of caching servers, CDN infrastructure, reverse web proxies, load-balancers, internal IP prefixes, archived content, and associated hosts may also help during the investigation of virtual hosted infrastructure. Be sure to check out tools such as the Host/IP Pattern Extraction Tool (host-extract.rb), Halberd, The Web Archive, HTTP Archive, and W3AF.

To circle back to your original question, it is possible to scan for vhosts using an NSE (Nmap Scripting Engine) script called http-vhosts. However, it's good to know the intricacies of the entire target architecture before settling on a final decision about what has been / has not been discovered.

Typically, I find it easier to first find a path disclosure vulnerability that leads to a file read inclusion vulnerability -- and then to download the web server configuration in order to go through it manually. Or email/phone/text/DM/FaceBook-message the web server administrator who has access and then ask him or her for a copy of the web server configs.

If you are on local LAN (force with --send-eth), you can map the MAC Address' OUI 12-bit extension identifier map to the org assigned by the IEEE Registry Authority. Nessus and some other tools do this by default. My favorite is NetworkMiner of the traffic, as it also provides a sample of packet analysis and gives a good view of what happened for proactive troubleshooting.


Plugin for integrating SQLMAP and BURP SUITE

Is single dash. Anyway, be sure of change the burp version to yours. So, in the example of the link you put, the command is: Java –classpath burpplugins.jar:”burpsuite_v1.4.0.1.jar” burp.StartBurp . In my case, is Linux, the Java must be in lowercase java, not your case because you are using windows which is case insensitive for this... and my command is java -classpath burpplugins.jar:”burpsuite_v1.7.0.3.jar” burp.StartBurp but the point is you must unzip the files in the same folder as burp is.

Anyway, the plugin doesn't contribute too much in my opinion. You can save into a file (from burp) the http request you need and then you can use sqlmap instead with -uparameter to specify a URL using a -rto specify the file with the http request you want to use and is the same.


Transmitting malicious code over audio speakers

You are misinterpreting the article. The author never claims the infection came from communication over a microphone, see this passage:

  For most of the three years that Ruiu has been wrestling with badBIOS,
  its infection mechanism remained a mystery. A month or two ago, after
  buying a new computer, he noticed that it was almost immediately
  infected as soon as he plugged one of his USB drives into it. He soon
  theorized that infected computers have the ability to contaminate USB
  devices and vice versa.

So the initial infection came from USB, which is not a uncommon attack vector in todays post-stuxnet world.

The interesting part, while still hard to believe but is possible, is the fact that two already infected machines would use microphone and speakers to communicate with each other to potentially pass along command and control information between themselves across a airgap.


Technically, yes, Google could do a lot of this. Namely, when you "use JQuery" in your site, you actually mean that the pages of your site reference that piece of Javascript, and whoever browses your site will automatically download it from Google's servers, allowing Google to easily know who downloads it, when, and in which site the link was found (because of the Referer header). This is easy to do, undetectable on your side, so one should assume that Google does it (if they are up to their reputation, that is).

Reading your pages is another matter. They could play nasty tricks by modifying the contents of that jquery.min.js file, in order to do various things with your site pages, including reading parts of it and sending them back to some server. However, this would entail a risk of detection, since that would be an active attack. Google's motto is "don't be evil" and they can maintain it only on the condition that they never look evil. Indulging in active attacks could seriously damage their image, and I doubt they would risk that for something as trivial as reading back your Web site (well, I don't know what your Web site does, but I doubt that what it contains would match the net worth of Google itself -- I hope you won't feel offended at the comparison).


If you are able to sniff your traffic in Wireshark:

Edit --> Preferences --> Protocols --> IEEE 802.11 --> Decrypt --> Enter hexadecimal key.