Re: [SECURITY] [DSA 2758-1] python-django security update

2013-09-17 Thread David Moscrip


Salvatore Bonaccorso car...@debian.org wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

- -
Debian Security Advisory DSA-2758-1   secur...@debian.org
http://www.debian.org/security/  Salvatore Bonaccorso
September 17, 2013 http://www.debian.org/security/faq
- -

Package: python-django
Vulnerability  : denial of service
Problem type   : remote
Debian-specific: no
CVE ID : CVE-2013-1443
Debian Bug : 723043

It was discovered that python-django, a high-level Python web
develompent framework, is prone to a denial of service vulnerability
via large passwords.

A non-authenticated remote attacker could mount a denial of service by
submitting arbitrarily large passwords, tying up server resources in
the expensive computation of the corresponding hashes to verify the
password.

For the oldstable distribution (squeeze), this problem has been fixed in
version 1.2.3-3+squeeze8.

For the stable distribution (wheezy), this problem has been fixed in
version 1.4.5-1+deb7u4.

For the unstable distribution (sid), this problem has been fixed in
version 1.5.4-1.

We recommend that you upgrade your python-django packages.

Further information about Debian Security Advisories, how to apply
these updates to your system and frequently asked questions can be
found at: http://www.debian.org/security/

Mailing list: debian-security-annou...@lists.debian.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.14 (GNU/Linux)

iQIcBAEBCgAGBQJSOJ/pAAoJEHidbwV/2GP+G1sP/RjyId0sDXuCUkDdkMyVS31+
5Hn5Gi5k9KtSAXD6hvVg8kvBWDJRonVUXuJ4cA2YwLtf8sdS7cI0SW/9w1xujnFS
TGvh2+Ghs8mxEeWj8pkHRUcoUdO985Z23GbSHYehC9JARZ0mFxLXCHwdJ8d1gLK3
7ZeV94KFx6z4dAA2zXZ3C87NN8ZTtiZfBeG1kvj+EnDMeOr2o72HgQShrLLONmBw
3s37LVgXNyoQyWt1Dt00axKfahe1eBdZd3Ex5iDfhciWgLgRmkmjFK+FgI4DwOHU
B4QY4dUhv+t4LX24IQuk3g/1omxpDZR/CXJaZ7Sdm3Xc2dbgqnQohExa5Dw7bwZ/
iGhQmfMPpUxSzYw2dSsygbBbxfRq2aVvxb7iFf2XJMXdQrrt7rVtqDR28HTdfFZ8
SLrzHlGSfcRqf+vlq3UqDCxjd+OHewFej6ZOmRYWV6vK4Uh9pmFmrPLJHg4EdDlr
67ZnvHVguF0YdpP3hi8N5pN5nNGUCwyt/lJxiDu6fESvIM/l/joa6MXVpEIb7Ej/
4ncefHu5fHLRlevKhOtu6SRvEUKAKZK7VZfdrC59S0r+AkNmRhO/XXM9Utm+8eLo
1zoufD+JS2S6ReNq/5K4TQHS+cy2qbBE6PtecDcVwiF4xrb9PJzd2fYUZ3dLdTkj
e/HUma7XNVNT3NvkHnnq
=OcAM
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-security-announce-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1vm0fc-0002zk...@master.debian.org



Script to System Check Integrity against Debian Package Repository

2013-09-17 Thread adrelanos
Situation:

* You have a Debian machine, which might be compromised by a backdoor
due to a targeted attack. You don't know and want to make sure it's not.
For example, a server or a client internet machine.

* You have a Debian Live CD or USB install, which you believe to be clean.

* You want to boot from the trusted system (CD or USB) and check the
internal hdd, which might be compromised.

Non-solutions:

* debsums: is a fine tool, yes. But its own man page acknowledges, that
it has limited use as a security tool. It also only supports checking
the system in which itself it is running. There is no feature to check a
Debian, which is in another folder.

* I have looked into intrusion detection systems (debsums,) Afick, AIDE,
FCheck, Integrit, Osiris, OSSEC, Samhain, Tripwire, but they all have in
common, that they want to create a known-good database before auditing.
This doesn't scale very well, because updates are pretty frequent, which
render that known-good database less useful. Re-creating the known-good
database after updating isn't very safe either - let's say apt-get had a
bug and installed a malicious package, then the checksum of that
malicious package would end up in the known-good database.

Goals:

* No code within the untrusted system must be required to be executed in
order for the check, since no code inside the vm image is trusted while
testing.

Work in progress:

I wrote a bash script, which uses dpkg from the trusted system, to parse
the /var/lib/dpkg/status file from the untrusted system. It then uses
the trusted system, to download all packages, which are claimed to be
installed in /var/lib/dpkg/status and extracts them.

The sha512 (could be easily replaced with sha256) checksum of all files
which come with the package is created on the trusted system and checked
against the files from other untrusted system. Known good files will be
stored in an array, mismatches will be reported and stored in array as
well. Symlinks are checked as well.

At the end, the script goes through all files within the untrusted
system and compares which one are already known as good or bad and
reports which extra files, which have not been verified against
anything, are there.

Ideally, there are very few extra files. Only changed configuration
files and files manually created by the user.

In reality, it seems like many files are auto-generated and not owned by
any packages. Some of them even hold binary code, which gets executed
during boot. Some examples:
- /boot/grub/video_fb.mod
- (dpkg -S /boot/grub/video_fb.mod reports not owned by any packages)
- /lib/modules/3.10-2-686-pae/modules.symbols
- /etc/ssl/certs/GeoTrust_Global_CA.pem
- /etc/ld.so.cache
- /etc/rc*.d/*
- /usr/lib/python2.7/dist-packages/pygtk.pyc
- and many more...

It could be quite difficult to get a signed version of some of them or
to deterministically freshly generate them?

And I have open questions, such as:
- Which package is responsible for creating device files (/dev/...)? How
to check if they are legit?
- Is there a signed dump of the grub boot sector somewhere?
- What other places exist to hide rootkits?

Where would be a good place to ask such questions?

All in all, I am wondering, is writing such a verification script a
promising or futile approach?

At the moment, the script is still Whonix specific and verifies a .img
image file. It wouldn't be hard to make the folder it audits
configurable and to check any other hdds or root folders.

If you like to have a look at the work in progress script, see:
https://github.com/Whonix/Whonix/blob/master/release/verify_build

Comments, criticism, enhancements, etc. welcome. It would be great if
anyone is interested to co-author the script (we can pick any Free
license) to make it usable for the general use-case.

Cheers,
adrelanos


-- 
To UNSUBSCRIBE, email to debian-security-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/5238a34e.6040...@riseup.net