-7

My first post here! After searching and trying and failing for several weeks, here I am. Thank you for your insights on this issue.

Part of my job requires investigating and blacklisting spam/phishing sites, as well as analysis of suspect PDF files. To that end, I have installed Kali on a VM (Virtualbox) which has tools for this PDF analysis task.

After some research, several highly-touted options were recommended and this is the crux of my problem now. I am trying to use peepdf for this file analysis, and I get the following error output when executed:

root@kali:/media/sf_Sandbox# peepdf -f 0001_DDT_2017_000115.pdf Warning: PyV8 is not installed!! Warning: pylibemu is not installed!!

After much trial and error, it would seem that the pyV8 code no longer exists in numerous paths either on Git or googlecode, and I'm tired of trying yet another hopeful solution posted months back that get me close but no cigar.

Why not try another solution? Because, dammit, it's personal now ;)

I have installed the dependencies:

libboost-python-dev
libboost-system-dev
libboost-thread-dev

(Plus a couple others that immediately escape me)

Next we try to get the pyV8 code:

root@kali:/media/sf_Sandbox# svn checkout http://pyv8.googlecode.com/svn/trunk/ pyv8 svn: E170013: Unable to connect to a repository at URL 'http://pyv8.googlecode.com/svn/trunk' svn: E160013: '/svn/trunk' path not found

Same error for V8 (#svn checkout http://v8.googlecode.com/svn/trunk/ v8)

Plugged the URL into a browser, 404 so the path is no longer valid.

Midstream

root@kali:/media/sf_Sandbox# git clone https://github.com/buffer/pyv8.git Cloning into 'pyv8'... remote: Counting objects: 8042, done. remote: Total 8042 (delta 0), reused 0 (delta 0), pack-reused 8042 Receiving objects: 100% (8042/8042), 16.19 MiB | 122.00 KiB/s, done. Resolving deltas: 100% (4783/4783), done.

Now I'm getting errors building with Python

python setup.py build

So there's a new path to go down at least.

2nd Found yet another promising path to take, outlined on GitHub here: hxxps://github.com/v8/v8/wiki/Building-from-Source

However, I get a new slew of errors running:

tools/dev/v8gen.py x64.release

subprocess.CalledProcessError: Command '['/usr/bin/python', '-u', 'tools/mb/mb.py', 'gen', '-f', 'infra/mb/mb_config.pyl', '-m', 'developer_default', '-b', 'x64.release', 'out.gn/x64.release']' returned non-zero exit status 1

uname -a

Linux kali 4.13.0-kali1-amd64 #1 SMP Debian 4.13.10-1kali2 (2017-11-08) x86_64 GNU/Linux

Running python 2.7

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
  • 3
    If this is intended for real production use, I would not use kali-linux. It's not really meant for something like that. Consider Ubuntu or Debian if you are already somewhat familiar with Kali. If not, you can also consider other alternatives, such as Fedora or CentOS from the "Red Hat camp". – hyde Jan 17 '18 at 17:15

2 Answers2

3

In order to get peepdf working properly we need pylibemu and PyV8. Here's how:

for pylibemu:

sudo apt-get install libemu-dev libemu2 python-libemu python-pylibemu

for PyV8:

cd /usr/share
sudo git clone https://github.com/emmetio/pyv8-binaries.git
cd pyv8-binaries/
sudo unzip pyv8-linux64.zip
sudo cp -a PyV8.py _PyV8.so /usr/bin
Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
2

PyV8 should copy to python dist-packages path

sudo cp -a PyV8.py _PyV8.so /usr/lib/python2.7/dist-packages/
qing. Yu.
  • 21
  • 1