If you go by the spec and examples from first, neither is correct.
Let's start with examples:

CVE-2015-1098 - which is about DoS in iWork via a specifically crafted file - is scored as AV:L and UI:R.

CVE-2009-0658 - which is about a buffer overflow in adobe acrobat via a specifically crafted file - is also scored as AV:L and UI:R.

The reason in both cases is that the vulnerability is in the local parser and the victim has to open the file.
Looking at the CVSSv3 spec , we can see why:

Network: A vulnerability exploitable with network access means the vulnerable component is bound to the network stack and the attacker's path is through OSI layer 3 (the network layer).
Local: A vulnerability exploitable with Local access means that the vulnerable component is not bound to the network stack, and the attacker's path is via read/write/execute capabilities. [...] she may rely on User Interaction to execute a malicious file.

Neither of the attacks work on the OSI layer 3, so they are not "Network", but they do rely on a user executing a malicious file, so user interaction is required.
Note that this is in contrast to CVSSv2, where the CVSSv3 examples list the issues as access vector network (which doesn't really match the CVSSv2 guide). The CVSSv3 user guide offers some explanation for this:

In CVSS v2.0, Scoring Tip 5 stated: "[...]" This guidance sometimes led to confusion in cases where an attacker would trick a user into downloading a malformed document from a remote web server, exploiting a file parsing vulnerability. In such case, analysts using CVSS v2.0 would treat these vulnerabilities as "network," [...]
This guidance has been improved in CVSS v3.0 by clarifying the definitions of the Network and Adjacent values of the Attack Vector metric. Specifically, analysts should only score for Network or Adjacent when a vulnerability is bound to the network stack. Vulnerabilities which require user interaction to download or receive malicious content (which could also be delivered locally, e.g. via USB drives) should be scored as Local.
For example, a document parsing vulnerability, which does not rely on the network in order to be exploited, should typically be scored with the Local value, regardless of the method used to distribute such a malicious document (e.g. it could be a link to a web site, or via a USB stick).

So basically, the CVSSv2 network scoring resulted from confusion and is not seen as correct.
Note that browser-based attacks are seen as completely different than file-based attacks, as the network stack is involved (the link contains a rather lengthy explanation).
From a technical perspective, this scoring makes a lot of sense to me, as it actually looks what the attack vector is. Practically, it may seem a bit odd that two issues which result in the same damage and which may be exploited in very similar scenarios receive so different scores.
You did not ask about it, but your CIA ratings as L seem too low to me. I think a good argument could be made for H, which would give you CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H -> 7.8


Question about the cause of the differences in Google Pay features

Most likely, Google withholds the full number of the credit card as a way to prevent someone else that got access into your account to get it. They only reveal the last four digits so that you can discern which credit card it has. This implies that you are not allowed to edit the credit card number, as that would allow the user to view the full number. Removing the card and adding a new one works well, instead. (Plus, they probably have some internal identifier to link this card with purchases, so internally they probably want as well that a new card is set up as a new object, not as a change of an old one)
However, you found out that

if you use Google Pay at the checkout page of a seller's website, you will find that you can see your actual card number and edit it

I would consider this a result of the implementation of this particular seller. The seller API clearly lets them know the full credit card number (this could be needed to linking a chargeback to card XYZ with a purchase, or if they are handling directly the communication with the merchant). The seller page also allows you to change the credit card number on-the-fly. Which is a good feature from an UX point of view. However, showing the full credit card number here misses the point of actually attempting to hide it from the user (note that credit card numbers aren't considered a secret, but it isn't a good idea to make them much available, either). I think they should simply show those last characters instead.

but right-click is disabled on the payment form (What is the reason for this?).

Sometimes websites block right-clicking "for security", such as trying to "protect" the page code they sent to the user browser by blocking the contextual menu and thus making it slightly harder to view the page source. It doesn't really work, though, so that will basically only annoy users that wanted to use it (e.g. for actions as mundane as 'Copy' or 'Paste'). It makes sense to block the right click if the page implements its own contextual menu (several webmails do this) as a replacement (otherwise the user could get one upon the other), but little else.


Cloud computing: future security challenges and solutions

There's a wide range of issues that you could include in a cloud security paper.  One that I've come across which I think will be the cause of a fair number of problems is the way in which security mis-configuration is exposed to the Internet, and therefore may have a higher likelihood of being exploited.

In a "traditional" network, there's limited visibility of security misconfiguration (eg, missing patches, access controls incorrectly configured, default credentials), and as such there's a lower likelihood of those issues being exploited.  This isn't to say that those issues are "ok" in any way just that thy're somewhat hidden from general attackers.

Looking at cloud setups, in some cases a single misconfiguration can be catastrophic from a data security standpoint.

As an example look at companies using Amazon S3 as their main storage for their applications.  If the S3 ACLs are done incorrectly it can be possible for people to access any data in that bucket.  Also access is controlled by a static API key as well as a username/password pair.  If either of those credentials is compromised, again all the data stored on that system is potentially at risk.


It depends how the botnets communicate:

Most basic botnets will communicate using the old school Internet
Relay Chat.
Some applications also communicate using HTTP calls, getting their
commands occasionally from one or several control  servers
Some botnets use peer-to-peer using sentinels for intermediate control. Distributed botnets have the benefit that they can't be taken down by taking down one controller.

So as you can see there is not just one single protocol that can be used. Most protocols also use custom calls to obfuscate their presence. Remember these bots do not want to be detected.

Some references:

Botnet communications primer
Taxonomy of botnets
The new era of botnets


Your email provider will probably have a way for you to report spam for analysis, there are lots of organizations that fight spam and make internet a better place. Here are a few that allow you to submit spam for analysis:

spamcop
sophos
microsoft
mcAfee
websense
gmail
forward your email to spam@uce.gov
canadian spam reporting center

you can use your favorite search engine and search for the term "submit spam" to get a list of sites that allow submission of spam for analysis.


Is off-the-record style encryption possible with email?

Simple forward deniability is easy to achieve with PGP: simply don't sign the email you send ! Anybody can send emails with arbitrary contents and alleged sender; signatures are meant specifically to cancel forward deniability.

However, if you do not sign you also lose integrity. What you would like is to be able to send an email such that:

the recipient can be reasonably sure that the email is from who he believes the sender to be, and has not been altered in transit;
but neither external attackers or the recipient themselves gain any proof that could be shown to third parties that the alleged sender really sent the email.

Connected protocols like instant messaging can achieve these properties by using a shared secret established with a protocol like Diffie-Hellman. When Alice and Bob share the secret K (and used authentication to establish that shared knowledge), and Bob receives a message with a correct MAC value which uses K, then Bob knows that the message comes from Alice, because only Alice and himself know K, and Bob did not send it himself. However, Bob has nothing "convincing" to show, because since he knows K, he could have forged all the messages.

With emails, there is no connection, so no semi-transient shared secret: a secret value that sender and recipient share, never stored in a file but still retained for several successive messages. However, there is a kind of "encryption-with-MAC" format in OpenPGP, section 5.13. The format is also very flexible, so one could build an OpenPGP message containing:

a public-key encrypted session key packet which contains a random K encrypted with the recipient's public key;
a signature packet which includes a signature computed over the previous packet (and only over that packet, not the plaintext data);
the plaintext data, as an "encryption-with-MAC" packet.

Such an email would incarnate forward deniability with integrity: from the outside, it can be proven that the alleged sender sent at least one message, one day, to the recipient; and the recipient can show K and the proof tells that K was known to the sender too. However, nobody can demonstrate that any specific message contents were encrypted with K.

Unfortunately, though the OpenPGP format can support a lot of combinations, this is not necessarily the case of existing implementations (like GnuPG). Moreover, the "encryption-with-MAC" packet uses a cheap homemade MAC (it simply appends the SHA-1 hash of the data, and encrypts the whole lot) which does not look very secure to me. I am not aware of extensive studies of that sort-of-MAC construction, but I would not bet my last shirt on its robustness.

So you can potentially have forward deniability with authentication and integrity in PGP but only as long as the relevant software support this specific combination, which, as far as I know, they do not. Yet.

In cryptographic research, there is also another type of algorithm called ring signatures would could be applied to the subject: with ring signatures, the sender (Alice) computes a special type of signature involving her private key and the public key of the recipient (Bob), such that it can be proven, from the outside, that either Alice or Bob computed the signature, but which one actually did it is unknown.

There is no currently defined support for ring signatures in OpenPGP.


Are darknets in the internet like Tor and i2p similar to darknets implemented for security like the CAIDA network telescope?

TLDR:
 - The two are distinct concepts (as you noted)
 - The use of "darknet" in both cases is coincidental
 - As of 2015, "darknet" would be much more likely to refer to a private overlay network

In full:

In their paper about operating the Internet Motion Sensor (Bailey et al, "Practical Darknet Measurement") refer to the unallocated IP range as a portion of "darknet" and cite the website for a similar malware distribution monitoring system "The Darknet Project" (http://www.team-cymru.org/darknet.html) as the source of the name. They in turn cite no source and appear to have coined the term themselves.

In both cases the descriptions are clear about their use of the term as unallocated address space and do not relate it to the other common definition; an overlay network that is not directly accessible by standard protocols and applications as used to browse the rest of the WWW.

This appears to be simply a matter of the same name appearing independently in two contexts. The paper by Bailey et al, for instance, was written in 2006. At that point the word "darknet" was still largely up-for-grabs (the concept of Tor had been presented in 2004 and was not yet as well-known as it is now). That is no longer the case as the use of the word to describe an overlay network overwhelmingly dominates public consciousness. In research circles specifically focusing on internet traffic monitoring the use of "darknet" to refer to an unallocated IP range would likely still be understood, but I would personally avoid it in favour of one of the alternative names.


Website login desktop program instead of sharing passwords

The easiest solution would be to refactor applications where possible, but if you cannot edit the source there are a few strategies:

"Middleman" password/account management solutions.

In this class of solutions, the actual password management is delegated to another service. The better solutions will be able to login to an application and change the password, then the password is changed by the application/service before each user logs in and is changed when the user logs out or time expires. In this way a password is produced for each individual and it has no value after the session because it has changed. If you want to research tools look for the class of "Privileged Identity Management" (PIM) tools.

Similar to a PIM solution, is a Privileged Access Management (PAM). Sometimes these tools are considered similar or a product may do both, but my definition of PAM is where the tool brokers the access for you. This article from Thycotic gives a brief look at terminology (warning from a Vendor)

Most of these services are designed for the OS level and are not always easy to configure with some type of cloud / SaaS service which has a workflow or 2FA.

Jump Box Solution

You may want to restrict access to authenticate to the service to a specific host. You then have strong authentication and logging on that host (maybe even record the screen). This may be sufficient for your needs depending on the apps and if you only need to do simple correlations to who was on the jump box to the application's logs. At the very least you can record all the activity. Some jumpbox+PAM solution may offer this through a web interface.

The weakness here is that you are not putting the control on the app, but at a lower level.

Proxy the authentication

If you are working with a popular cloud application, you may be able to find a CASB that you can put in front of your application and will enable the logging. The CASB may have the capability to do some form of PIM, pass a token, etc.

You may be able to setup some type of reverse proxy solution. OpenIAM describes such a setup for legacy applications - I have read about this before but we never got around to trying to implement it for a legacy application to which we had wanted to add SSO.

Note:

In your original post you talk about auto-filling forms. This still means the password could be intercepted or that two users could be authenticated at the same time if the web app does not prevent concurrent sessions. I would avoid anything that is like a end user password manager that just syncs the password files.

The ideal solution will make it so only one user can be on at a time and where an individual user either never sees the password of his version of the password becomes "one time" use.


plugins to lengthen short urls for security purposes

I prefer a different Firefox add-on called RequestPolicy. It's a much more general purpose security tool in that it enables you to control all requests to external URLs. Along the way it converts shortened URLs to the real URL and let's you decide if you want to go there.

It exposes all the external links of a web page and let's you decide which to allow.

At first you might find RequestPolicy annoying because many sites won't function as you would expect until you allow external links. Now that I am used to it, I like it a lot.


LDAPS connection failing with "PKIX path building failed" since AD controller certificate renewal

Depending on the actual software that is doing the certificate chain validation, there are several possibilities how this might have worked before the renewal:

The old certificates were directly trusted locally w/o basing trust on a CA at all.

While this is strictly not possible (as valid certificate chains must start with a root certificate), most implementations allow for this options (such that, for example, self-signed certificates can be trusted without adding the overhead of a CA setup).
The software does not use the trust store you are looking at.

Obiter Dictum:

  Even with a correctly presented certificate chain, this connection shouldn´t be trusted, as the root CA is not known by the system.

That does not exactly hold true. Even though the root CA might be untrusted, a intermediate CA might be cross signed by another CA that the system in question has established trust in.


Techniques for fingerprinting a web based content management system (CMS)

It sounds like you are interested in finger printing a CMS. This can be done similar to what is done with nmap. You would need to compromise a library of unique urls, etc and than scan a page to see if they exhibit these.

You can use BuiltWith.com.

Here are some examples of it is use:

Joomla.org being positively identified as Joomla
Wordpress.org being positively identified as Wordpress

Some other useful/related finds:

Nmap Plugin to identify Drupal websites
Scritch seems to have a script similar to BuiltWith
Wapalyzer Plugin to do some detections
web-sorrow: a perl based scanner which includes checks for CMS
Blind Elephant: another scanner
plecost: A wordpress specific scanner
whatweb: yet another scanner which doesn't seem to be as actively developed
OWASP Favicon DB: Not quite functional on its own, but if you hash the favicons as you download and they match, could be used as one indicator.

You could also do some google hacking with the url + keywords like "Joomla" or "Wordpress" to see if the site is listed in a showcase, they asked for help on a forum for a particular CMS and listed their site, comments, code hints, search for specific strings in the url, e.g., inurl:index.php?option=com_content.


User Account Notification under Windows useful at all?

It depends on your environment. For a lot of users it's another layer of security which is basically telling the user to rethink what they are doing in hopes that if it is something bad, they won't do it. However a lot of users will instantly click yes and not even think about it. I personally have my UAC set to "Notify me only when programs try to make changes to my computer", which does not notify me when I make changes to Windows settings. Therefore it isn't as annoying when I make changes, but it could still alert me if a rogue program is trying to make a change that I wasn't aware of. When I see the box pop up I can rethink what is going on.

Yet again, in the end it depends on you and your environment. Many organizations think it's a good idea to have, but in the long run it's easier to just turn it off due to complaints from users and/or upper management. No matter what, user training and education is going to be the best defense.

Edit from comments:
I can definitely agree that this isn't the end all solution to stopping malicious software. While the user not having admin rights, antivirus/antispyware, local firewall, HIDS, etc will be your last layer of hopefully blocking anything malicious from getting to the computer. The UAC will just potentially warn the user of the final steps of it. It's a small layer, but still another layer defense


There doesn't seem to be a standard. For Microsoft's CryptoAPI:

  When the computer finds multiple trusted certification paths during the certificate validation process, Microsoft CryptoAPI selects the best certification path by calculating the score of each chain. A score is calculated based on the quality and quantity of the information that a certificate path can provide. If the scores for the multiple certification paths are the same, the shortest chain is selected.

That sounds very ad hoc to me. Also, from the 2002 PKI Forum, 2002, Understanding Certification Path Construction (thanks to @StackzOfZtuff for the reference):

  The certification path construction process has
  not been standardized, and there is very little published information
  available to help implementers and product evaluators understand the
  complexities involved.


Why is having the username and password no longer enough to log in to an account anywhere?

Single factor authentication is a method whereby you are required a piece of secret information to be able to authenticate. Typically a username and a password. The main problem with this is that passwords are often short, reused across multiple services, based on dictionary words, etc. Consequently attackers are able to not only find passwords on previously breached services and attempt to reuse them against other services, but also make highly effective guessing attacks.

Multi-factor authentication is a method whereby you are required a piece of information that you know and at least one more that you have. For example a username, a password and a one-time token from an authenticator app. This makes it far more difficult to compromise a given account, since guessing or finding or stealing the correct password will no longer be sufficient to gain access to the account. This is a very beneficial security feature.

Since you lost access to the email address you used to register your account all you can do now is ask support very nicely if they can help you in any way. A round 'no' isn't entirely unexpected though since what you did may even go against their T&Cs.


Why does Hydra return 16 valid passwords when none are valid?

Same problem happened to me when I was playing with DVWA. The reason is that you're trying to brute-force YOUR_SERVER/dvwa/vulnerabilities/brute/index.php which needs authentication. Try to visit that page in your browser and you'll be prompted to enter a username and a password (different form from the one you're trying to brute-force)

So while you're trying to brute-force this:

Hydra is actually "seeing" this:

On the second form you won't get the message "Username and/or password incorrect.", which you told Hydra to use to differentiate between failed and successful logins. Hydra doesn't see that failed login message, so it's assuming that the login was successful.

So you need to login using a browser, get the session cookie (by default, PHPSESSID) , and feed it to Hydra, and then Hydra will be able to "see" the first form.

Supposedly, you can set the cookie in the HTTP headers in Hydra by doing H=Cookie:NAME=VALUE or pointing Hydra to a file which sets the cookie by doing C=/path/to/file. Unfortunately, non of these worked for me.

After getting frustrated, I ended up commenting Line: 5 (dvwaPageStartup) in the file /dvwa/vulnerabilities/brute/index.php, which allowed Hydra to see the actual vulnerable login form.


The entire list is shipped with the browser (atleast for chrome). This is made clear on hstspreload.org:

This is a list of sites that are hardcoded into Chrome as being HTTPS only. (emphasis mine)

The list is updated with the browser. The complete list can be found here and does include the domain mechmk1.me.


How can Facebook possibly stop a bruteforce attack on an account?

Despite the fact that Facebook locks accounts after many tries as the other answers said, you should keep in mind that "replacing your IP with a new one" is not as trivial as you make it sound.

Most internet service provider allow you to release your IP lease and get a new IP address, but the attacker will usually receive one from a small pool of a few hundred to a few thousand IP addresses.

Sure, there are proxy servers and the TOR network, but these will only supply the attacker with a few hundred additional IPs.

When the attacker has access to a botnet, they could use each bot of the botnet to request as many IP as they can get from their respective ISPs (good luck doing this without the user noticing anything). But large botnets are expensive.

Spoofing the IP address won't work either, because IP spoofing isn't easy to do when you want to not just sent packets but also receive the responses. When you want to brute-force a HTTP login, you will need to perform a TCP handshake first, which requires to be able to receive responses. Also you certainly want to parse the response to know if you were successful.

And even when you could theoretically use all ~4 Billion IPv4 addresses the internet has to offer, multiplying your tries with 4 billion only gives you enough tries to bruteforce passwords with 4-6 additional characters (depending on how many different characters the password contains).

And last but not least, the main problem with brute-forcing via network is the bandwidth you have available which greatly limits your attempts per seconds compared with what you can do when you brute-force hashes locally.

When you use a 8 character password with mixed case, numbers and special characters and no dictionary relation (common recommendation), brute-forcing via network is completely infeasible, even when the system uses no flood protection whatsoever.


MITM attack between me and TOR entry node

They can not read your traffic, because the communication between you and the entry node is already encrypted.


My IP address switched suddenly and then switched back

Change your password. Regardless if this is a genuine compromise or not password hygiene is vital, especially when anything that is suspicious is flagged up.

You should also set up two factor authentication.

There are number of innocent reasons why this could happen though, I've listed a few below, which are in no way meant to be an authoritative final answer, just possibilities.

I agree with David, this is probably due to the ISP, it may be a BGP issue or it may be down your source address appearing as one of intermediary device on the path to tumblr.

Additionally, tumblr may parse the login session into its own logging system, if this triggers any kind of rule it may generate a new log for investigation and log the IP as that of its own logging system, this is something that I see in my own work all the time.

As for the yahoo spider, that really is a tricky one. This may be down to the way tumblr caches userids and botids it is possible that the crawler address has been appended to your session cache in tumblr's system erroneously, the cache has cleared and everything has went back to how it should, bar the suspicious log.

There is also a possibility that that rogue application has either been given or taken access to your account and is at play here and is allowing the yahoo crawler access to your account (or is spoofing its IP as not to look overly suspicious).

Have a look at the tumblr Account Security page


CWE-234 - Snprintf Missing Parameter issues

Well... As you may know, it can lead to undefined behavior (i.e., either format string, memory leakage, denial of service or even more).

However, I will describe some caution to be taken on snprintf(3) function at following.

Difference between snprintf(3) and sprintf(3)

The goal of both is redirect the output of printf(3) to a buffer. Thus, you can build with a desired content and echoes it using one format string at once. What differs one to another is the at least bound requirement, being explicit in their parameter. It helps out to avoid the lengths of buffer (first parameter) exceed the size that it can deliberately take it. That's why there's the letter 'n' in the suchlike functions (i.e., strncat, strncmp, strncpy, strndup, ...), it indicates the functions that can automatically put a null byte (aka null terminator) at the end of string. So, despite it avoid such errors as stack based buffer overflow1, it can avoid alone against adjacent memory attacks2.

some technical notation about snprintf(3):

One of utmost important information that you should know is "the size of buffer shall always be equals to the size parameter."

In detail:

According to the GNU C Library (glibc) documentation, the snprintf(3) prototype is:

int
snprintf(char * restrict str, size_t size, const char * restrict format,
    ...);

char * restrict str: A restrict char pointer. In C99, the restrict keyword refers to an only pointer that is capable to access the object value that the pointer itself points to. It means that the whose value in a memory allocation is accessed through the only pointer that was declared as restrict. With that in mind, you can note that is made to avoid other declared pointer susceptible access value of the same place of the memory (such thing called "pointer aliasing") –– For more information read the reference 3 (from Wikipedia) and 4 (from StackOverflow, taking as a 2nd example)

size_t size: Denotes the at least (not less than) amount of byte that the buffer (described above) can stores.
Suppose that it buffer holds "s|l|a|y|e|r|\0" values, each byte in its respective substring, ergo the prime obligation is the size of buffer to be equals to 6 –– When I say "size of buffer", I am referring to the buffer itself (1st parameter and not the 2nd parameter, which is a recipe of how much bytes the buffer can take it). Therefore, whether the size of buffer is less than 6, you are prone to dealing with undefined behavior such thing that I aforementioned at the beginning of this answer. However, you can have a truncated buffer's string contrariwise (when size of buffer is greater than 6).

const char * restrict format: A constant char restrict pointer that handles values corresponding to the type of format string5.

...: It is the optional numbers of arguments, functions that contains this parameter are called variadic function6 and can handle it using symbols existing in stdargs.h header7.

Analyzing a part of pdfio2.c source code

The char keyword is equivalent to from  to  (8 bits) in decimal and it can also reaches from  to  (still using 8 bits) when you use unsigned right before him (127 + 128 = 255). So, given the complete code that you left in reference, at line 2276:

snprintf((char *)buf, 32, "%d", objout);

If you analyze some lines before it, at lines 2262, 2263 and 2264 you can see the declaration of some variables including buf, objout and objin:

2262: l_uint8   buf[32];  /* only needs to hold one integer in ascii format */
2263: l_int32 start, nrepl, i, j, objin, objout, found;
2264: l_int32 *objs, *matches;

l_uint88: It stands for "leptonica_unsigned_int8", when the l_int8 is equivalent to char keyword because the range of bits it from  to , namely, a signed 1 byte integer (or 8 bits integer). It is a smallest bits of a object that is not recognized as a bit-field.

l_int329: The logical is the same as right above. But now, it is equivalent to 4 bytes, in other words, it ranges from  to .

Nevertheless, the buffer named as buf is declared as l_uint8 that can holds up 8 bits long being from 0 to 255 in decimal (unsigned char), but when receives such data, it casting to char, it is necessary to prepare the buffer to be compatible with the data that will be received from 3rd and 4th arguments – otherwise you'll gotta a compilation error because you are storing the expected char data in l_uint8 typedef variable without casting to.

Continuing to looking at substituteObjectNumbers() function:

At line 2241 until 2255 you'll see a brief commentary about what the function is suppose to do:

/*!
 * \brief   substituteObjectNumbers()
 *
 *  Input:  bas (lba of a pdf object)
 *          na_objs (object number mapping array)
 *  Return: bad (lba of rewritten pdf for the object)
 *
 *  Notes:
 *      (1) Interpret the first set of bytes as the object number,
 *          map to the new number, and write it out.
 *      (2) Find all occurrences of this 4-byte sequence: " 0 R"
 *      (3) Find the location and value of the integer preceding this,
 *          and map it to the new value.
 *      (4) Rewrite the object with new object numbers.
 */

A little bit of PDF syntax:

Note: this section is a brief of the book Developing with PDF10.

In light of this, the first "Note" in the commented code above you must noticed that he's talking about the PDF format file. In a PDF file format are 9 types of Objects (also referred as COS Objects – COS stands for Carousel Object System) and they
can be represented as Indirect Objects or Direct Objects and can still referenced to each other.

Type of Objects: A PDF file format supports:

1. null;
2. boolean;
3. integer;
4. real;
5. name;
6. string;
7. array;
8. dictionary;
9. and, stream.

Direct object: Appears inline and are usually found as the value of a dictionary key––being an entry in an array and by the Object type.

Example 1 – Indirect objects made entirely from direct objects

3 0 obj        % object ID 3, generation 0
<<
 /ProcSet [ /PDF /Text /ImageC /ImageI ]
 /Font <<
     /F1 <<
        /Type /Font
        /Subtype /Type1
        /Name /F1
        /BaseFont/Helvetica
        >>
>> >>
endobj
5 0 obj
(an indirect string)
endobj
% an indirect number
4 0 obj
1234567890
endobj

Indirect object: Those are referred to by the reference. In order to figure out which object is being referred to, every indirect object has unique ID (per-PDF), expressed as a positive number and a generation number that's a positive number too, and usually is represented by zero (0)––either are used to identify the object and to reference the object.

Example 2 – An indirect object that references other indirect objects

3 0 obj                           % object ID 3, generation 0
<<
 /ProcSet 5 0 R                   % reference the indirect object with ID 5, generation 0
 /Font <</F1 4 0 R >>             % reference the indirect object with ID 4, generation 0
>>
endobj
4 0 obj                           % object ID 4, generation 0
<<
 /Type /Font
 /Subtype /Type1
 /Name /F1
 /BaseFont/Helvetica
>>
endobj
5 0 obj                           % object ID 5, generation 0
[ /PDF /Text /ImageC /ImageI ]
endobj

If you would like more examples, take a look at Minimal PDF as well11.

Back to the function code:

The objout variable given from snprintf() at line 2276 holds value of the buffer objs[objin]. This buffer receives the data from the 3rd parameter of sscanf() at line 2274 and that data comes from the 1st parameter named as datas, which is a pointer that serves as storage for the returned data from the l_byteaGetData(bas, &size) function, at line 2269. The function l_byteaGetData() returns the array of data from a given file.

To conclude...

So, it requires an argument to execute and hand on. And I am stuck on a curiosity of how do you execute the static analyze upon this code? A PDF file format is required to sanitize data until pass to the substituteObjectNumbers() and it’ll find out every “ 0 R”, meaning references to any Object type and performs your 3rd and––the final––the 4th act which is described in the commentary at line 2252. Remapping object through its found number.

Now, I have no clue what exactly static analyze tool you'are using to do so, and the measures taken by the tool to acknowledge the presence of this type of weakness in the code. I cannot speculate whether it is either false positive or not, though.


Risk of specific changes to the "Trusted" security zone

An EDI VAN is a secure outsourced network where EDI documents can be exchanged between business partners. Your company is provided with a "mailbox" or alternate means from which EDI documents are sent and received, similar to traditional paper based mail (snail mail). The “value added” part of the mailbox are often services like mail notifications, inspect, authentication, and validating the message.  Messages should be tracked and recorded for auditing purposes, as well as other services available through VANs, such as backup and recovery, mapping, compliance and more.

For everything to be in order you must have high trust in the EDI VAN provider and / or be able to make sure it handles security in a sufficiently good manner. Otherwise, you may end up with something being compromised.

Setting everything as "trusted" is definitely not a good security practice. That would practically allow that software to do anything and transmit anything across your infrastructure (given the other settings).

Instead, you should ask the provider what ports or other limited settings are specifically needed to enable correct communication between the software and its destinations. Mixed content means the connection is not required to be secure, which is a big risk (you will transmit data that is not encrypted).

Therefore, you should definitely determine how trusted that provider is and warn your company in regard to security.


How secure is OS X's Keychain access control?

The security boundary is root, i.e. securityd running as root. If securityd and it's ACL are implemented correctly, there is no way for another application to access the key from the keychain. However, Mac OS X has had several privilege escalation vulnerabilities which would allow a local user attacker to access securityd and thus the item from the keychain. It is reasonable to assume that a moderately/highly skilled attacker could still find existing privilege escalation 0day.


SFTP vs VPN and Samba share to share files remotely

The disadvantages of using Samba over VPN are:

I've found in practice that windows file shares often get stuck up doing something in the background without giving any user feedback about what is happening. I've had to disconnect and re-create the share to continue file sharing. Although specific instances can be investigated and configuration related issues resolved to fix these problems, but the lack of clear feedback to the user during file transfers makes it frustrating to users.  On the other hand, SFTP user programs like FileZilla give clear and specific details about the file transfer and any errors encountered.
If users already have VPN connections they regularly use for work or connect to clients, they would need to disconnect form those and connect to your to transfer files.
A VPN client must be installed as it creates a virtual network interface; whereas for copying files over SFTP users could simply copy Filezilla, WinSCP or Putty files and start using them without installing them.
If you have problems with file transfers you need to look into two services/logs to understand and resolve the issues - VPN logs/config & Samba logs/config.

Considering all these reasons, I would recommend using SFTP.

Maybe a decade ago I would have recommended Samba when simple user-friendly SFTP interfaces were hard to find, but with excellent user-friendly opensource programs available now, SFTP is a better option.


How to speed up slow TLS handshake on ESP8266 running mbed TLS?

The main bottleneck is on the key exchange, where the asymetric crypto is done.

Use rsa key exchange, it is by far the fastest method. This way it only has to compute the client key exchange, avoiding server key exchange calculations. Furthermore you can control client key exchange time by changing the cert size.


Security of Windows Screen Saver Password

Possible intrusion methods to achieve this could be a hard reset of the computer, change boot priority, and insert media with code capable of bypassing login credential requirements.

(Hiren's boot CD or F4UCD for Win7 and earlier versions can do this).

Without restarting the computer, as GZBK said, if autoplay or autorun is enabled, then a USB may be recognized regardless of the computer being  locked.

An additional method would require either a 0-day or unpatched vulnerability which uses the IP and/or MAC as a point of intrusion, making sure the malicious code has remote code injection abilities.  With this RAT deployed against the system via the network, you wouldn't need to bypass the login, because you would already have access.

For practical purposes, the answer to your primary question is "secure, but with flaws."

You are better off using it, and using a difficult password, than not using one at all.


There are a lot of things wrong here, but to answer your question; no, there is no problem with calling serialize();  on user-submitted data. The only problem is what you then do with the output.

Your entropy gathering essentially boils down to: microtime() which will give you about 12 bits of entropy given typical TCP latency noise to a remote server, which is not a lot...

If you use $entropy to seed an encryption key, that key will be known to whoever submitted the HTTP request. This might not be a problem in your system, but it is something you should be aware of.

In short; if I submit a request to the page above, I will be able to predict the value of $entropy down to about 1 in 4000.

You are much better off reading a few bytes from an entropy generating stream such as /dev/urandom on unix systems, or the crypto-api on Windows systems.


Does WPA2 Enterprise mitigate evil twin attacks?

I would call this an evil twin attack. And it's not uncommon to see corporate laptops vulnerable to this.

WPA2-Enterprise supports a number of EAPs - Extensible Authentication Protocols. (Wikipedia article) The security depends on which EAP you use, and how you configure it. Some EAPs more vulnerable to an "evil twin" attack than PSK, as an attacker doesn't need to brute force the key.

Fortunately, a number of EAPs are secure against an evil twin. One approach is to use TLS internally; PEAP is a popular option that does this. To be secure against an evil twin, you must enable certificate verification and distribute the certificate to all your clients. There is no need to get such a cert issued by a root CA.


When changing a password using a WebPage, must the old password be entered on the same screen?

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

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

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

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

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

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


Under xmlrpc attack, what is the best approach?

That happens all the time, on the first moment, identify the ip addresses that are attacking your wordpress and just block it with iptables.

On a second moment, install Fail2Ban, configure it to watch wordpress/apache logs, ssh, and any other kind of log that you think that are useful. Apache have several modules, to make users respect your server and don't flood it with requests.

Also, analyse your wordpress install for vulnerabilities, weak passwords, and analyse the logs to detect any intrusion.


CORS error but only from AJAX and not from HTML form

This is the expected behavior.

Before CORS it was already possible to make cross-site requests using HTML forms, cross-origin inclusion of images ... . But it was not possible to do cross-site XHR (Ajax) and thus workarounds were done by developers using the allowed methods.

CORS changed this by loosening the original restrictions and allowing cross-origin XHR in some cases. "Simple" XHR are allowed without asking the server first because the same requests could have been done before with HTML forms etc. All other XHR need a pre-flight request first which checks if the server is accepting the HTTP request.


Is TDEA (TripleDES) invulnerable to the weak keys of DES?

A weak key for a block cipher is a key such that encryption and decryption turn out to be the same function. This means that with such a key, a black box which nominally encrypts things only can also be used to decrypt things. A semi-weak key is a key such that the decryption function with that key is identical to the encryption function with another key.

DES is a permutation with 64-bit blocks; there are 264! such permutations (it is a huge number, close to 10347382171305201285699) and the key selects one such permutation. There are "only" 256 possible keys, so the 256 encryption functions and the 256 decryption functions "should" be all distinct from each other, with an overwhelming probability, if we assume that the key selects permutations "at random" (that's the "ideal cipher" model). The existence of weak and semi-weak keys is thus some extra structure, which is worth mentioning, although calling them "weaknesses" is an overstatement. Weak keys and semi-weak keys are part of a more general class of "weaknesses" called related keys. Related keys can be a concern in some specific scenarios where an attacker can force usage of related keys through some weakness in the key generation process; unless something is done thoroughly wrong (like it was done with WEP) or the block cipher is used in an unusual way (e.g. as a building block for a hash function in a Merkle-Damgård construction), related keys attacks are no real threat to security.

Testing a given key for being "weak" is not useful with DES, because risk of a properly generated key being "weak" is extremely low. Simply "trying" a few thousand potential keys ("bruteforcing") will yield a much higher success rate for much less effort.

3DES being three DES instances in a row, it also has "weak keys": given weak keys K1, K2 and K3 for DES, the key K1 || K2 || K3 is a "weak key" for 3DES. As is the case for DES, this is a noteworthy mathematical curiosity, but it has no practical security implications.


Call the bank and cancel the card. It's the only way to prevent it from being used, since any merchant with whom you've previously used the card, or anyone who otherwise already has the card data (including simply a photograph of the card) could theoretically run it in a card-not-present transaction.

Once you cancel the card, the physical plastic card is relatively useless.

But if you want the most certain way to destroy a card, then the only way that is 100% effective and guaranteed to be absolutely irreversible is burning/melting it.


Is this safe to display MySQL query error in webpage if something went wrong?

End users should never get to see the gory details of your environment.

Instead it is more professional to show a generic 'Sorry something went wrong' page. At least visitors can see that you have a real error handling mechanism present on your website.

However those errors should be written to the mysql error log and should also trigger a notification by E-mail or otherwise to the IT team. Those errors should not happen so it can be a sign that your site is failing or is possibly under attack.


There's no native way to create a single variable-content mask with John or hashcat. Instead, you can generate a set of all possible masks that fit your criteria. See my answer here.

In your case, the policygen command might look something like the following (assuming lower case):

$ policygen --minlength=9 --maxlength=9 \
  --mindigit=4 --maxdigit 4 --minlower=5 --maxlower 5 \
  --maxupper=0 --maxspecial=0 -o target.masks


I don't think that there is any method supported directly by AWS to prevent users from logging into any account (that they have rights to).

AWS promotes the use of multiple accounts. With the recent announcement of AWS Single Sign-On it is even easier to use multiple accounts.

Announcing AWS Single Sign-On (SSO)


How to detect malicious code sending information to attacker's server in linux

it really depends on how deep the attacker is in your system; if he's controlling your DNS then this will be a little tricky; if an attacker is already on your server, youre doomed anyway. There are a lot of hidden backchannels that are not easy to detect or command-channels using twitter, p2p, dns-queries, etc. pp; search SANS-ISC Reading-Room for "hidden channels" to get an idea of what might be possible

  Redirect ... and see by sniffing if there is any suspicious traffic

Nearly impossible; heuristics dont work.
And what do you do with encrypted traffic?

For controlling http-requests:

Use squid as a transparent proxy and use a whitelist with allowed connection-targets

For general networking-control:

Use strict iptables-setup infront of your server (DENY anything, allow what is needed)
Log any outgoing connection-attempt for later analysis
Use tcpdump to record any traffic (don't forget UDP)


How does combining SHA256 with RIPE-MD160 compare to SHA256 + SHA-3?

When using SHA256 + RIPEMD-160, you are not only accumulating two different algorithm, but you are also varying your algorithm vendors, since SHA256 comes from US NSA/NIST and RIPEMD-160 comes from the european academic community.

While it is true that SHA-3 has not been directly designed by NSA, it went as a winner from NIST competition, and NSA is more or less involved in NIST, may it be for the good or the worse. So, if you combine SHA256 + SHA-3, the two algorithm may be linked to the NSA and at least to NIST, so this may be seen as a potential weakness you can avoid by combining two algorithm with no link between them.


What patterns does a signature based anti-virus look for?

Most antivirus solutions use a variety of techniques to identify malware.

The simplest (and oldest) approach is to use signatures of known malware such as MD5/SHA1 hashes, or specific strings in binaries.  This technique worked more successfully with older malware which didn't have the number of variants we see today.

Next we have heuristic static analysis.  This works by scanning files and looking for suspicious features such as packers, obscured code, specific library imports, etc.  You could say this is the closest to the "patterns" you are talking about.  One could write malware and tweak it until it isn't detected by the most common malware heuristics.  These patterns and algorithms are closely guarded secrets of each antivirus vendor and they are unlikely to share them beyond generic explanations.

The last form of malware identification is through dynamic heuristic analysis.  This is when malware is run in a sandbox, and the antivirus looks at what the software does.  It looks at the libraries it calls, the actions it performs, whether it tries to hide itself, if it makes registry entries etc.  There are lots of ways to avoid identification through dynamic analysis which are too in depth for this answer, suffice it to say that it can by bypassed.

TL;DR Nobody can tell you exactly what the patterns are for each antivirus program.  There are some generic things they all look for, but the specifics are secrets.


A presigned URL is like a temporary password included in the URL. Everybody which knows this URL can have access to it as long as the URL is not expired. But web crawlers (there are way more crawlers than Google) will be able to access the URL only if they get to know it because it was included in some public web site or similar. They would not be able to just guess it and crawl it (and would not even try it) because the secret part of the URL is long enough so that it cannot be brute forced during the life time of the URL.


How ECDHE is signed by RSA in ECDHE_RSA cipher

Here's how it works in a nutshell:

1)  The client connects to the server.  The server advertises the SSL/TLS protocols that it supports, and sends its SSL certificate to the client.  The certificate includes an RSA public key, and the certificate is (presumably) signed by a recognized CA
that the client trusts.

2)  The client verifies the certificate's CA signature, and (presumably) trusts that the certificate is valid.  The client and the server agree to use ECDHE.

3)  The client and the server generate a set of ephemeral ECDHE keys that are used to facilitate the secure session.  The keys sent by the server to the client are signed by the server using the server's private key (which corresponds to the public key that was previously sent as part of the certificate in step 1 above).  The client validates that the signature is valid using the server's public key received previously (which was previously determined to be trusted).  Thus, the client can trust that the ephemeral keys that it received from the server were indeed sent from the server, and not from a man-in-the-middle attacker.

4)  The client and the server proceed with secure session using the set of ephemeral keys.  These keys are discarded by both the client and the server at the end of the session (and not reused) to facilitate perfect forward secrecy.


What cryptosystem makes the encrypted text look like random noise?

Let's first be clearer about "random noise". This is not defined in general. What you may have is a sequence of random values within a specific domain. For instance, you want to have a sequence of bits that is indistinguishable from uniformly random bits.

If you want pseudo-random bits, then you will be happier with symmetric than asymmetric encryption. Asymmetric encryption uses mathematical objects with a lot of structure, which tends to show up as biases in encoding. One can still do some asymmetric encryption which "looks like" random bits, but, in the long run, this requires some effort (e.g. Diffie-Hellman key exchange can be "unbiased" by using an elliptic curve and its twist, assuming that both are suitable for cryptography, i.e. have an order multiple of a large enough prime).

When using symmetric encryption with a block cipher, the random-looking appearance is normally obtained -- that is, if the output does not "look randomish" then that is considered to be a weakness. Indeed, the classic penguin picture illustrates that ECB is weak because it fails at ensuring such randomness of appearance. Good modes will achieve the kind of property that you are after. However, there are ways to botch it. For instance, while AES-GCM is, by all measures, a very fine encryption mode, is uses an Initialization Vector which must be known to the receiver; since the IV is not secret, it is usually chosen by the sender and encoded along with the raw GCM output. The IV from successive messages may be biased; indeed, one great point of GCM is that it tolerates non-random IV (it just needs successive IV to be distinct from each other). Therefore, the IV may betray the presence of non-noise in your output data.

Such "hiding" property is not usually desired (it is not actively avoided either), therefore existing protocols make no effort in that direction. Hiding data in such a way that observers don't even suspect its presence is, indeed, the whole point of steganography, and encryption can help, but only with some care.


Exchange of DEK and KEK (encryption keys) between app server and key server

Should I send (en_dek + data) to the key server or should I fetch the KEK into the app server? Which one is more safe practice?

Sending the key en_dek to the key server to be handled there is pretty much how a hardware security module works at a high level. The advantage of this approach is that the key material never touches the application server. So any compromise of the application server can only decrypt the keys that are currently in memory, as well as potentially submit decryption requests to the key server. However, the attacker does not automatically get access to the master key itself, which is important.

Given you're already talking about sending the data to another system to be decrypted, I wonder if it might not be better simply to send the data, thereby hiding the key entirely from the application server?

In any scheme like this, the security of the key depends entirely on the security of the server or HSM on which it is stored. Usually, true HSMs are reasonably good at protecting keys unless you're very handy with electronics.

  Both these methods have a flaw that if an attacker is able to get access to either of these servers, he will get to know both KEK and DEK. How can we prevent this?

You can't, except by using a dedicated HSM, which is essentially what you're discussing building. I would simplify the scheme and keep the keys on one server dedicated only to cryptographic operations, and keep that server locked down.

For more on these two points, see the OWASP rules on cryptographic storage.

  When we talk about key rotation, which of the two keys (DEK and KEK) is rotated?

Ideally, both. Rotating the KEK should be easier, since DEKs are fixed size and there shouldn't be all that many of them. Rotating DEKs might be harder if you are encrypting lots of data.

From the OWASP page, which says it better than I can:

  Rekeying refers to the process of decrypting data and then re-encrypting it with a new key. Periodically rekeying data helps protect it from undetected compromises of older keys. The appropriate rekeying period depends on the security of the keys. Data protected by keys secured in dedicated hardware security modules might only need rekeying every three years. Data protected by keys that are split and stored on two application servers might need rekeying every year.


How to send Wi-Fi management frames from macOS?

Seems like you're asking how JamWIFI sends a disassociation packet rather than anything else so I'll answer that. Firstly, looking at the Git repo we see the following:

libpcap provides a good point of abstraction for sending/receiving raw 802.11 frames at the MAC layer

This is the first half of the answer to your question, he's using libpcap. If you haven't heard of it before, it is a very large packet capture library but it can also do a bunch more here's the documentation.
The second half of the answer to your question lies in the code. I am by no means an Objective-C or C dev, however, if you take a look inside ANClientKiller.m we get an idea of how it sends a de-authentication request. Starting at the top of the code, we have the request itself defined as:
#define DEAUTH_REQ \
"\xC0\x00\x3A\x01\xCC\xCC\xCC\xCC\xCC\xCC\xBB\xBB\xBB\xBB\xBB\xBB" \
"\xBB\xBB\xBB\xBB\xBB\xBB\x00\x00\x07\x00"

You might be wondering what this packet does, so I'll tell you. The above packet is effectively an announcement which states that the receiver is no longer authenticated. Once this is sent, it causes the de-authentication, ironically in an attempt to re-authenticate. The trick here is that the request must be accepted & it must take immediate effect. That's all there really is to it. This is the same way that de-authentication takes place in Aircrack-ng. As well as other tools. Well, using the same packet at least.
As far as actually sending this packet goes, that is a bit more language specific. If you look further down the code you'll notice the following:
- (AN80211Packet *)deauthPacketForBSSID:(const unsigned char *)bssid client:(const unsigned char *)client {
    char deauth[26];
    memcpy(&deauth[0], DEAUTH_REQ, 26);
    memcpy(&deauth[4], client, 6);
    memcpy(&deauth[10], bssid, 6);
    memcpy(&deauth[16], bssid, 6);
    AN80211Packet * packet = [[AN80211Packet alloc] initWithData:[NSData dataWithBytes:deauth length:26]];
    return packet;
}

This is where you'll need to read up about memcpy if you're wondering on the specifics. Basically, this bit of code is preparing the packet to be sent.
Using memcpy it is taking the bytes from DEAUTH_REQ and copying the exact number of bytes to the destination. Once this is done we return the packet now with the DEAUTH_REQ inside it, as well as the BSSID (MAC address of the access point) and the client. This packet is now ready to be sent for a de-authentication to take place. If you were to keep sending this packet, you would keep de-authenticating the client from the access point to which they're connected.
You'll notice I have not included the code where the packet actually gets sent. This is because that entirely depends on what language you using to achieve this and what library and so there are too many specifics/nuances.
Hopefully that answers your question. If you would like to implement this yourself in another language, you could more or less take the code from JamWIFI only changing the nuances of your language & it would work, regardless of being on a mac. There is plenty of de-authenticating WIFI client implementations online already so you wouldn't need to re-invent the wheel.


How do I purge Windows of my private data when formatting the drive is not an option?

Note that if you were on an AD Domain, domain administrators would have had full access to your computer anyway. The usual caveats about physical access, unencrypted drives, etc, all apply, so this is not real security but will prevent subsequent users of your computer from getting easy access to your data.

If you were not part of a domain, then the best you can do is create a new administrator account, and then delete your old account and profile from the new one.

Make sure that the recycle bin has been emptied. If the Volume Snapshot Service is running, delete any volume shadow copies by running cmd with elevated privileges:

vssadmin delete shadows /for=c:

Finally run the following command for each drive:

cipher /w:c:\

Where c: in both cases is the drive letter designation. This will wipe all free space, making it unrecoverable. See this answer for more information.


how does mdm (mobile device management ) work in byod environment to control the camera?

As you've already surmised, the only thing you can do is to prevent the camera from working at all.

Unfortunately, tiny camera's are prevalent everywhere now so completely preventing this issue is pretty well impossible without taking very extreme actions.


Securing a JavaScript app with RESTful backend

My seven cents here...Nothing can be 100% secure. But 99% is doable. You could use the HMAC or even an RSA algorithm with JWTs (I'm assuming you're well versed on JWTs. If not, here is a nice article). The token is generated using said algorithm once on every successful user login. The secret is only stored server side, but there have been uses of client nonces (read more here). You could pass the secret between client and server, but it would have to be dynamic and the re-generation of tokens could impact performance.
You can turn off access to cookies via scripts by enabling the HttpOnly property on the cookies that are issued from the server. You could also set short expiration times for tokens so in case of theft, they expire shortly after. Make sure to establish TLS 1.0 or better for any and all communications between client and server, and maybe some monitoring and alerting on events generated from the app. All the best :)


Value of DNSSEC with allow-downgrade option

Yes, as the man page of resolved.conf states:

  Client programs looking up DNS data will be informed whether lookups could be verified using DNSSEC, or whether the returned data could not be verified (either because the data was found unsigned in the DNS, or the DNS server did not support DNSSEC or no appropriate trust anchors were known). In the latter case it is assumed that client programs employ a secondary scheme to validate the returned DNS data, should this be required.

Thus, client programs can make appropriate use of the response, either warning the user of no dnssec validation or showing dnssec validation.


In mysql usage means that the only facility is to to authenticate the user. Typically a native database account would not be used for authenticating users.

If the user has update privileges (and the application is vulnerable) they can subvert the application.

If you are asking how to provision write-only access for a user, then this can be done by writing directly to the grant tables though this is frowned upon. A more sensible and portable approach is to grant only the exec privilege and use stored procedures with an explicit definer who does have access to the underlying data.


How can this executable have an .AVI extension?

Unicode allows for right to left languages as well as left to right, so what you have here is a cleverly arranged title including a right to left part with .exe being the suffix.

From https://www.explainxkcd.com/wiki/index.php/1137:_RTL

U+200e    LEFT-TO-RIGHT MARK
This is used to insert left to right script into a right to left sentence.
U+200f    RIGHT-TO-LEFT MARK
This is used to insert right to left script into a left to right sentence.
U+202a    LEFT-TO-RIGHT EMBEDDING
The following text will be left-to-right. This will not change directionality of characters, so for example Arabic letters will stay right-to-left. This character alone does nothing in an English text, since the text direction is left-to-right by default.
U+202b    RIGHT-TO-LEFT EMBEDDING
The following text will be right-to-left. This will not change directionality of characters, so Latin letters will stay left-to-right. Full stops, which don't have a directionality on their own, will be left of the sentence. Use this character for some little misplacings that cause big confusion.
U+202c    POP DIRECTIONAL FORMATTING  The following text is formatted like the text before the last U+202a, U+202b, U+202d or U+202e character.
U+202d    LEFT-TO-RIGHT OVERRIDE  The following text will be left-to-right. Additionally, the directionality of characters is changed to left-to-right. Used alone in an English text, this will only affect characters that are right-to-left by default, like Arabic letters.
U+202e    RIGHT-TO-LEFT OVERRIDE  The following text will be right-to-left. Additionally, the directionality of characters is changed to right-to-left. Use this character to completely screw up an English text.

So, as you have spotted, the .exe comes last and indicates to Windows that this is an executable, despite visually looking like an .avi file.


I'm assuming here that what you want to do is perform static analysis for the purpose of identifying security issues in the code bases you've been provided?

If that's the case there's a number of approaches you can take.  Assuming that the people who are doing the reviews are not skilled application security analysts, you're going to need to rely on tools for a lot of the work, although beware the tools in this fields are seldom (if ever) point and click affairs.

Depending on the language you may find the vendor has some tools that can be used (e.g. FXCop)

Then there are open source tools like flawfinder and RATS

Lastly there are a number of commercial solutions like Checkmarx and Fortify and if you want a managed solution Veracode

Exactly how you go about it will depend on your budget (hint, the commercial tools aren't cheap), the skills you have available and the amount of time for the reviews.


Should inactive administrator accounts be DELETED/expunged?

I'll argue to delete them.  The only thing that prevents these accounts from being used is:

  Inactive administrators cannot log in.

And that is a defense against brute forcing (or fooling) an authentication, yet it does not defend against privilege escalation.

OWASP guidelines for web applications argue that a client should never hold a session with authentication for two separate accounts.  That would prevent privilege escalation in most cases.  Yet, by far, not all web applications follow OWASP guidelines.

Therefore, keeping those inactive but still privileged accounts is a possibility of an attack vector.

The other side of the coin is that the procedure for deleting the accounts may consume resources or, even, be insecure in itself.  But managing to produce an account deleting procedure that is vulnerable to an attack is much less probable than being hit by a privilege escalation.

Just don't make the periodic account deletion procedure to delete the inactive accounts by first logging into an active administrator account over the network.


Protocol(s) for Keyless Remote Encrypted Storage?

Since the server is not trusted to keep data private the data have to be encrypted and decrypted locally at the client and the server should never have access to the key used for encryption. And since only already encrypted data are exchanged with the server this way it would not even matter much if the transport is secure or not.

Methods to derive a key from a password exist and called key derivation functions. The functionality of locally encrypting and decrypting data exists already in a variety of application and many of them open source too. Examples are GPG and Veracrypt.


Any browsers where I could escape the URL with certain characters?

Not sure exactly what you mean by "escape the URL", but I can think of three sneaky things related to URL:s to try in a situation like this:

XSS: If there is no escaping at all, you might try an URL like " onClick="alert('XSS');. However, basic XSS filtering or just URL encoding the URL will make this hack impossible.
Change protocol or scheme: You mention data://. An other popular trick is javascript: or vbscript:. All these have in common that they have to be at the beginning of the URL to do anything. If the URL starts with a hardcoded part, like youtube.com, you're out of luck.
Open redirects: If YouTube has an open redirect, you could create a link that takes the user anywhere on the internet. If the user expects to end up on YouTube, but instead ends up on a site you control, you could use that for phishing. I'll admit that this isn't exactly the most powerful attack, but it shouldn't be ignored either.


Does any VPN protocol authenticate the server?

OpenVPN is in fact based on OpenSSL, and uses both client and server certificates to authenticate both sides.

PPTP, SSTP and L2TP can be deployed in various modes, including modes with certificate-based authentication. Note that these protocols doesn't provide underlying encryption, which is provided by optional, associated IPSec layer.

And IPSec can use either static, symmetric keys or IKE protocol stack to exchange and manage such keys. In both modes both server and client and authenticated.

Of course nothing will protect you from sniffing and/or redirecting your traffic in raw, encrypted form. But such form will be useless most times for anyone (except for forensincs purposes, but that's outside of the question).


How can a domain be impersonated with a fraudulent SSL certificate?

There are multiple ways to exploit a compromised certificate.

If you have a compromised website certificate, you need to get people onto your server when they type the address of the compromised one. This can be done:

By getting control of a DNS server, there you can basically change the association of a website URL to your server IP address.
By performing a DNS cache poisoning attack
By performing a Man in the Middle attack (e.g. you own a router) between your target and the website, thus redirecting him to your own server

If you have compromised a root CA certificate, you can do even better. Since you have the "master" key you can forge false certificate in the name of whoever you want. Therefore you are able to impersonate any website. This is mostly valuable to someone who can fully control a DNS server (closed internet countries for example) as they can invisibly spy onto each and any internet connections made on any website, since they can forge certificate on the fly and perform man in the middle attacks.


Why do we need security measure likes control flow integrity and buffer overflow guard if we have good access control protocol in place?

Control flow integrity and buffer over flow protection are measures against exploiting coding bugs in a program. Access control is about controlling who can access some device or application etc.

By assuming that access control would be sufficient you assume that a) access control itself is perfect and never has any bugs and b) access control makes sure that only innocent users will be able to access the remote device/application. You therefore conclude that the remote device/application can have lots of bugs since no hacker will even be able to reach the buggy code in order to exploit it.

Both assumptions are wrong: a) access control can have bugs like other software and b) some hacker might hack into the trusted client and is therefore treated as authorized to access the remote device/application. And the hacker will not be friendly to a buggy application.


It's great to see that you're trying to understand what exploit and payload to choose, and more importantly, WHY. That's the way to do it. This will save you lots of time in the mid/long term, and will help you become a much better pentester.

  I should find the correct exploit and payload, based on the information collected to gain access. But I don't understand the way to start all of this.

Usually, the payload is the easy part. It mainly depends on what you're trying to achieve on the victim system (get a shell, install a backdoor so you can connect to it later on, DoS the service/app, etc), but also on the reduced set of options available for the particular exploit you will end up choosing.

  Assuming that my target has 20 ports open, I want to test the vulnerability using an exploit payload that do not require user interaction. The possibilities of which exploit and payloads to use are now reduced, but are too many. Searching and testing all exploit and payloads for each ports isn't good! So, if i don't know the vulnerability of the target, how do I proceed?

In order to choose the right exploit, most of the time you will have to do some research. Sometimes a little bit, sometimes a lot. Of course, you want to do this process as efficiently as possible in order to save time (this seems to be your main question).

In real-life scenarios, a host will usually have only a couple ports open, maybe
a few, but you will hardly ever find one with a number of open ports as large as 20. This narrows down the search quite a bit. For the couple open ports you find open, you'll want to identify the software (including version) running on each one and then try to identify potential vulnerabilities for this software (see note [ 1 ] below). If your goal is to simply get access the system, you will want to go for the "low hanging fruit" -- a popular phrase in the security community (see [ 2 ] below). This means that you will first look at the services that have better chances of being vulnerable. For example, HTTP is usually one of the first services to look at, because in general web applications are much more likely to have vulnerabilities when compared to other type of software. A MySQL/SQL server would be somewhere in the middle of the list, whereas an SSH one would usually be last (assuming it's running a recent version). But in order to make these decisions, you need to identify all services/versions first.

Sometimes the easier targets will not strictly depend on the service type itself, but how badly configured/maintained it can be. Examples are using blank, default, or easily guessed credentials, having obvious SQL injection issues, missing critical security patches, etc. Most of these apply to different kinds of software/services.

There's not much detailed theory out there about the "low hanging fruit". The practical experience you gain over the years makes a big difference. I did find a useful image at https://www.tenable.com/blog/vulnerabilities-by-common-ports-dashboard that's worth sharing:

Note how HTTP/80, HTTPS/443 and SMB/445 have the highest number of high and critical vulnerabilities, and also a big percentage (55-90%) of those are exploitable. On the other hand, even though SSH has a large number of high/critical vulnerabilities as well, only 3% of those are actually exploitable.

[ 1 ] Searching for vulnerabilities in a specific piece of software is a little science in itself. Usually, I start by simply googling about the software and version combined with the words vulnerability and/or exploit. I often find googling much quicker than using other tools, but of course I use the other tools as well: search function in MetaSploit Framework, www.exploit-db.com and its searchsploit tool included in Kali, https://www.securityfocus.com/vulnerabilities, specific software vendor website (security announcements), etc.

[ 2 ] Sometimes you will want to try to identify and exploit every single vulnerability on the target system, and not just one that will get you access. This is particularly true for some pentest engagements, since the customer wants to make their system or network as secure as they can, so it's very valuable for them to get a report listing all vulnerabilities found, the different ways they were exploited (or could potentially be exploited), remediation steps, etc. If you only include one, the customer can patch it but could still have lots of other security issues that could result in their system or network being compromised.


I could not properly locate the hosting providers for their domains - peabolin.com, ...

First, make sure that this is really spam and that it is impossible or useless to complain directly to the sender of the mail.

Then you might start by getting the IP address of their website:

$ dig www.peabolin.com
...
peabolin.com.           3501    IN      A       91.185.198.54

You could also check the IP address of their incoming mail server:

$ dig mx peabolin.com
...
peabolin.com.           3419    IN      MX      10 peabolin.com.
...
peabolin.com.           3419    IN      A       91.185.198.54

In this case both point to the same IP address and you might lookup who is responsible for the IP:

$ whois 91.185.198.54
...
% Information related to '91.185.198.0 - 91.185.198.255'
...
% Abuse contact for '91.185.198.0 - 91.185.198.255' is 'abuse@telemach.net'
...
inetnum:        91.185.198.0 - 91.185.198.255
netname:        Telemach-NET
descr:          Broadband Network Services

If you feel that the domain owner misuses this network (for example to send spam) you can contact the abuse contact shown above. But note that you should also check that the main actually has its origin by this party and is not a spoofed mail. You can also check the Received headers in the mail which path the mail has taken and which IP addresses are involved - IP addresses used for sending might be different to the ones used for receiving. See Email header IP address for more information.


If you mistakenly try to access a website with an unrelated username/password, do they record your logon data?

They could be, phishing sites are set up to do exactly this.

On non-malicious sites, this would be generally be considered poor practice, but there is no reason why they couldn't, beyond user privacy regulations.


Crypto keys for database encryption are stored and backed up separately from the database itself. To read a backup, you'd need both the backup file itself and a copy of the key.

To crypto-shred the database backup, you would simply destroy any copies of the key and any backups of the key. Because the key backup is much smaller and changes much less frequently (and therefore has fewer backups), it is much simpler to delete the key than hunt down all the database backups and destroy them.


How to keep client data confidential when attacked by a ransomware?

If you are infected with a virus, then it's too late. Whatever the virus has access to is vulnerable at that point. This is true regardless if the virus happens to be ransomware or some other type of malware. The same thing is also true if a hacker (rather than a virus) gains access to your machine.

The best defense is to take measures to prevent the infection/hack in the first place.

Also, typical ransomware encrypts your hard drive which makes it inaccessible to you, so paying the ransom does not actually protect your data. All it does is allow you to access it again. The best defense against that type of ransomware is good backups. That way if you get hit you can just restore your machine. But you should realize that your data could still have been compromised.

Update: the type of attack you describe would probably not be called "ransomware", it more likely would be done by a live hacker who found some juicy data that they are now blackmailing you with.


File encryption at rest, password considerations

Is this generally wrong?

I see two problems with your implementation:

Using random prefix instead of IV

This technically could be done but it is not recommended or encouraged. Please see this for more details. Generate random IV for each file and save it along with ciphertext (as a prefix or suffix).
Using derived key directly as an encryption key.

In case a password is changed you will need to decrypt and encrypt all of the files again. To solve this, you should generate a single random encryption key that will be used for encrypting all of the files. You will then encrypt this key with a master key derived from user password and save it in a separate file. When password is changed (and consequently master key), you will only decrypt and encrypt the file containing the encryption key. For an example of a well known implementation that uses similar schema take a look at DPAPI and how it handles the keys.

  Is a single password/derived key enough or

  Should I derive a new key for each file (I worry the time it takes)?
  Should I derive a new key for a bulk of files (e.g. every 100)?

This depends on what are you defending against. Considering my comments above, you will not derive each encryption key out of the user password but rather generate them randomly from a strong CSPRNG. If you have new random encryption key for each file you will need to store the encryption key encrypted with master key along with ciphertext and IV. If the file encryption key is compromised only that one file is compromised. You need to think if it is possible for a single encryption key to be compromised without compromising the master key (brute force?). If this scenario is not likely or you choose not to defend against it, you can use single encryption key for all files.

One more thing to consider when using single key for all of the files is how large data encrypted with single key can be before you need to change the key. For an answer to this question please see this and this.


How do Lync and SSL inspection play together?

If the facts you mention in the Background section are true - there is no other way of making it work. If a client application looks for specific signature you can't use your proxy.

I think the best way you can handle it is to write a script that identify Lync servers, and add it to the exempt list.


Is 'Bring your own Identity' as the only authentication option a valid practice?

Yes this is a reasonable approach.

It is not a zero risk approach. If a user does not already have an OpenID Connect account, or they do not understand the concept, the sign up process becomes more difficult and you risk losing that user. Because you are doing something that is non-standard you will get some smart alec users who pester your support guys with pedantic complaints. And if there is some future compromise, perhaps a flaw in the OpenID Connect protocol, you may look foolish compared to the sites that never pursued this approach.

But on balance I believe this is a good thing to do. Most users will already have an account with one of the major provides and will be happy to use that, just as I happily use my Google account to log in to stack exchange. A smaller number of users will have an account with a minor provider, who they've chosen because they like their privacy policy. And some will even run their own OpenID Connect server. I believe this covers everyone's needs, so there is no need to provide a fallback to user name + password authentication.

Edit - rereading my post I realise I have made two assumptions:

That OpenID Connect becomes a widely-used, defacto standard. If it doesn't then you certainly need to provide alternatives.
That your site is not highly sensitive. If it is then you should probably be using multi-factor authentication.


Security implications of auto-submitting OTP?

I can't see any security implication with auto submitting a field rather than requiring them to click a button to submit the OTP. At worst you may have a few more accidental incorrect password submissions when people make a typo and it submits before they can fix it.

I guess it could be an accessability issue if you set the number of attempts very low and locked out accounts as a result.

There's a the small potential that when you lower the barrier of 2FA so low people may not put in the mental effort to notice when something is wrong https://www.biocatch.com/blog/ios-12-security-otp-autofill (although that specific link referrs to auto filling from a SMS message)


How secure is IDology's ExpectID (as used on airbnb)?

The service almost certainly checks the person's credit file with one or more major reference agencies and may check some government ID verification databases too, depending on the jurisdiction and if the government there provides such a service. (I.E confirming a SSN / National Card ID Number / Driving license / Passport is valid with the details supplied.)

If you could answer someone else's security questions in the manner described, you could probably apply for credit in their name or file fake tax returns on their behalf to get large tax refunds. You could also apply for jobs as them and pass some forms of employee background screening.

Similar questions are asked by the credit reference agencies when signing up for online credit monitoring services, which provide the user with almost every piece of information held on the person by credit reference agencies.

If a fraudster can sign up for online credit monitoring or take out large loans / mortgages / get into vetted jobs as a person then they are probably screwed over much more than if a fake account got created on AirBnB. (though admittedly having to prove that you weren't responsible for fraudulently renting out a room that didn't exist or murdering a guest would be pretty bad)

It may be possible to put fraud notices or a 'freeze' on your credit file which could provide some some protection against this (along with other types of identity theft and fraud).


Sending static registration links via email

When that link is clicked, an authentication page would show up in the machines internet browser and show a page where it asks for the user's company ID and birthday.

This is not a safe on-boarding process to prove that a new app user is associated with an identity in active directory. Birthday and company ID are way too public, particularly to other users in the company. Another employee would easily have access to the on-boarding link from their legitimate account.

The best solution would be some kind of actual identity federation. Sending an email/text to the users contact information that is already in the user database with a unique link would at least prove that they control the phone or email account.


is RDP7.0 authentication process secure enough?

Recent versions of RDP support SSL/TLS. RDP itself has its own format for transferring data packets; within these packets, recent enough clients and servers can transport the TLS records which will encode a tunnel into which the actual data will be sent (including authentication). This is reasonably secure, insofar as the client and server do not botch the implementation or misuse the certificates (see this answer for some discussion on the subject).

Also, TLS usage is optional and subject to negotiation between client and server; conceivably, an attacker trying a man-in-the-middle attack could alter the first packets so as to simulate a lack of TLS support on both sides, leading to a connection without TLS. It is up to the client implementation to detect this occurrence and abort the connection (or raise a warning and let the user abort).

TLS support was added in RDP 5.2. Free opensource implementations of the RDP protocol usually do not support it.

Another way to TLS-protect a RDP session is the Remote Desktop Gateway (formerly known as Terminal Services Gateway) which encapsulates the whole thing into an SSL/TLS tunnel. This is cumulative with other features of RDP, so you can end up with TLS-in-RDP-in-TLS. The gateway is a specific service available from Windows Server 2008, and only Microsoft's client appears to support it (according to Wikipedia, not even the MacOS port of Microsoft's client can use it).


This depends a bit on how the two are configured.

If Tor is the outer connection, then the proxy would prevent the traffic from coming from an exit node; since the list of those is public, this could potentially get around restrictions from a site operator who wishes to block Tor traffic.  It could also potentially serve as a layer of protection against a malicious exit node, as there's no encryption in the Tor protocol at that point; normally TLS (HTTPS) is used for that role, to prevent eavesdropping (e.g. a session stealing attack) or modification of the response (e.g. adding in advertisements or malware).

A free proxy site, however, is likely to be less trustworthy than Tor, though, which makes these benefits negligible.

If Tor is the inner connection, the proxy could be used to bypass restrictions by the ISP aimed at stopping you from connecting to the Tor network.  However, a common proxy like hidemyass is probably also blocked, and bridges are a more direct way of dealing with that problem.

Overall, I think the primary result would be a slower connection, with minor to negative impacts on privacy and security.


Have I been hacked? Terminal shows me in a different hostname than my machine

If you were unaware you can do local DNS resolution by modifying /etc/hosts this file looks something like:

127.0.0.1     localhost
192.168.1.2   DESKTOP-GD4U33R

So, this can be done for many legitimate reasons, as a local DNS lookup may be more favourable. Do realise that the localhost (127.0.0.1) is a loopback address; it is accessible via your machine only. A localhost lookup could be favourable if you were doing web server testing locally before deployment and hence needed privacy.
Mentioning your hostname changed from user@MacBookAir ~ to user@DESKTOP-GD4U33R ~ implies an application with root privileges made this change (I speak more about this below). Issue cat /etc/hostname will allow you to view your hostname. You can change your hostname either by editing /etc/hostname or in Settings > Network Utility. By default modern, Microsoft Windows machines use the hostname @DESKTOP-XXXXXXX where X is a random base-36 string of upper case letters and numeric characters. Just a suggestion for the possible naming convention, as it's quite specific, but as for your hostname becoming DESKTOP-GD4U33R and having a DNS resolution to DESKTOP-GD4U33R via 192.168.1.2 does seem quite unusual.
This is good news as the IP address resolves to your local network. Consequently, this potential threat is isolated. As mentioned identify who 192.168.1.2 is before proceeding further. But, I would suggest, presuming you are the network administrator or are authorised, using NMap to identify open ports on this machine; nmap -Pn -A 192.168.1.2 will suffice. This device can absolutely be an egress port on your machine, from terminal use ifconfig | grep 192.168.1.2 you can identify if this IP address is one of the machine's network interfaces.
ClamAV offers a macOS antivirus, but locally this looks more like an application modified /etc/hostname and /etc/hosts. It could also be worthwhile ensuring both files are read-only ls -l /etc/hostname; ls -l /etc/hosts should return something like:
-rw-r--r-- root root  /etc/hosts
-rw-r--r-- root root  /etc/hostname

Notice that only the root user (not group) should have write access.


What can virtualisation infrastructure operators do about ring 0 SMM exploits?

This vulnerability is not exploitable for VM escape.

The attack works roughly in the following way:

The attacker creates a malicious GDT at offset 0.
The attacker remaps the APIC MMIO region to the SMRAM by modifying the IA32_APIC_BASE MSR. This "overwrites" the SMM's DSC structure, which is used by the SMI handler to restore SMM GDT.
When an SMI happens, the SMI handler will use the malicious GDT, so the control flow can be hijacked.

The bottom line is that this type of attack is feasible only when the attacker can control the IA32_APIC_BASE MSR.

Assuming you run "hardware supported" VMs (VMX non-root mode), an attempt to write an MSR from a VM will generally cause a VM exit, which will be handled by the VMM. The "normal" way of handling an APIC MMIO remap is to either ignore it, or emulate the remapping in the VMM, but this will not cause host's APIC range to be remapped.
The only exception I can think of is when the VMM uses MSR bitmaps (which can be used to "whitelist" certain MSRs to not to cause VM exits), and it somehow incorrectly calculates that bitmap (maybe in the process of merging MSR bitmaps when using nested virtualisation) in a way that allows guests to modify IA32_APIC_BASE, but that would be a vulnerability of the VMM itself.

That being said, this vulnerability can still be useful for post-exploitation: if your VMM gets compromised, the attacker can use it to bypass TXT or install a very-hard-to-detect rootkit.

  is there any way to prevent this vulnerability from being exploited?

Actually, one way is to use virtualisation, or you can wait for an official patch (Intel is said to be working on it).

Jacob Torrey also has an interesting blogpost about this topic: http://blog.jacobtorrey.com/mitigations-to-the-memory-sinkhole


How does TrueVault's de-identification process work?

TrueVault recommends doing data de-identification and re-identification client side (within your web or mobile app logic). This makes two interesting flows:
De-Identification

Data is entered into your application by the user.
Your application (e.g. JavaScript code in a browser or Swift code on an iOS device) will split that data into what is identifying (names, phone numbers, etc) and what is not identifying (other health data).
The identifying information is sent directly to TrueVault from the client application through the TrueVault API. Ideally the end-user is authenticated as a TrueVault user, so the API permissions can be granularly defined. The API returns an opaque identifier that can be associated with the de-identified data and stored on your server.
The de-identified health data (along with the TrueVault id) is sent to your server. Your server is not handling identifying data & health data, so it doesn't fall under the purview of HIPAA regulations.

Re-identification
Let's say your end-users want to search for data based on criteria stored on your server (e.g. blood pressure) but they want to see identifying data in the result set. This re-identification should happen on the client. Something like:

Client device makes a request to your server to retrieve information matching the query.
Client device pulls TrueVault ids out of the server results. These ids are opaque, they are not identifying, but they can be used to retrieve identifying data from the TrueVault API (if properly authenticated).
Client device requests identifying data from TrueVault API corresponding to the TrueVault ids returned by your server. Ideally the end-user is authenticated as a TrueVault user, so the API permissions can be granularly defined.
Client device merges the datasets so the UI shows a re-identified view of the data.

Compliance
Following these steps, you can create a seamless user experience. There's no reason the end-user should know that you're de-identifying and re-identifying data.
This process is designed to keep your server infrastructure free from HIPAA Regulations, so you can host this de-identified data in a non-compliant manner if you chose. This is all above-board with HHS, they even have specific guidance on it: https://www.hhs.gov/hipaa/for-professionals/privacy/special-topics/de-identification/index.html.
By avoiding storing Identified PHI on your servers, you can skip the physical and technical safeguards that apply to server-side infrastructure. Please understand that you don't escape the administrative requirements of HIPAA entirely. For example, in the system described above there are still human beings looking at Identified PHI. Those humans must be trained and their access must be limited to the minimal amount needed for them to perform their jobs. All of this work is a hard requirement if you're making an application that must be HIPAA Compliant, whether you use TrueVault or not. What TrueVault saves you is all of the work to have secure and compliant infrastructure for storing data, maintaining audit logs, secure backups, high availability, controlling access, managing users, and lots more.


School manages Google accounts, what can they do or see?

Provided it's a G-Suite account (and it almost certainly is, as this is the only way they can manage the accounts unless you gave them your login credentials), they can see all data associated with that account, including but not limited to emails, search history, Youtube watch history, and numerous other things (for example, browsing history if you've logged into Google Chrome with this account as your primary account).
However, unless you explicitly grant access, they do not have any access to data on your other Google accounts (with the possible exception of the fact that you have logged in with other Google Accounts on the same device, but probably not what accounts those are).


Possible to use both private key and password authentication for ssh login?

With recent Fedora and RHEL 6 releases, you can use RequiredAuthentications2 pubkey,password to require both pubkey and password authentication. Usually this is done to require pubkey and 2-factor authentication token, not the user's password.

Update: Now on RHEL / CentOS 7, and any system with a recent version of OpenSSH, you can use:

AuthenticationMethods "publickey,password" "publickey,keyboard-interactive"

It's also possible to use the Match directive to exclude IPs or Users.