LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-16-2023, 07:57 AM   #1
barnarasta
Member
 
Registered: Oct 2012
Location: Spain
Distribution: Debian Squeeze-Wheezy-stretch-Buster \/ Unix SCO 5.7. in production, not for play.
Posts: 38

Rep: Reputation: 1
pdftk - break password


Good morning friends,
Debian 10 server
I have always prevented 'pdf' files from being modified with
# pdftk [1.pdf] output [2.pdf] owner_pw "pass"

Today I found this instruction that cracks the password:
# gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf

Any ideas to protect the 'pdf'
============================================================
Buenos dias amigos,
desde siempre evité que se modificaran archivos 'pdf' con
# pdftk [1.pdf] output [2.pdf] owner_pw "pass"

Hoy encontre esta instruccion que revienta el password:
# gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf

Alguna idea para proteger los 'pdf'
 
Old 02-16-2023, 12:18 PM   #2
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 569

Rep: Reputation: Disabled
Does not appear to crack a pdf I just tried.
comes back with
Error: /undefined in .setpdfwrite

1. What version of gs you have installed?
2. Try encrypting with qpdf?
 
Old 02-16-2023, 01:25 PM   #3
barnarasta
Member
 
Registered: Oct 2012
Location: Spain
Distribution: Debian Squeeze-Wheezy-stretch-Buster \/ Unix SCO 5.7. in production, not for play.
Posts: 38

Original Poster
Rep: Reputation: 1
Yvesjv, thanks for your interest


angel@histori:~$ gs
GPL Ghostscript 9.27 (2019-04-04)
Copyright (C) 2018 Artifex Software, Inc. All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
GS>
...........................
angel@histori:~$ pdftk -version
pdftk port to java 3.0.2 a Handy Tool for Manipulating PDF Documents
Copyright (c) 2017-2018 Marc Vinyals - https://gitlab.com/pdftk-java/pdftk
Copyright (c) 2003-2013 Steward and Lee, LLC.
pdftk includes a modified version of the iText library.
Copyright (c) 1999-2009 Bruno Lowagie, Paulo Soares, et al.
This is free software; see the source code for copying conditions. There is
NO warranty, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
..................................................................
angel@histori:~$ uname -a
Linux histori 4.19.0-23-686-pae #1 SMP Debian 4.19.269-1 (2022-12-20) i686 GNU/Linux
 
Old 02-17-2023, 11:57 AM   #4
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 569

Rep: Reputation: Disabled
bash-5.2$ gs -v
GPL Ghostscript 9.56.1 (2022-04-04)
Copyright (C) 2022 Artifex Software, Inc. All rights reserved.

pdftk is not installed and neither is the java version.
Can you repost your question in the security forum?
 
Old 02-17-2023, 12:06 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,725

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Do not repost the question in the security forum. If you want the thread moved please use the report button.
 
1 members found this post helpful.
Old 02-18-2023, 12:29 PM   #6
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 569

Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by michaelk View Post
If you want the thread moved please use the report button.
Thanks, didn't know that's the established procedure.
 
  


Reply

Tags
passwd, pdf, pdftk



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Break free of PRISM with the EFFs PRISM Break site LXer Syndicated Linux News 0 06-19-2013 08:53 AM
Netbeans 7.3: Program does not break at break points when debugging JavaScript OtagoHarbour Programming 0 02-22-2013 02:44 AM
break: cannot break karlochacon Linux - Newbie 1 05-06-2010 06:25 PM
Using pdftk to get all first pages of many pdf's into one pdf document zest n zeal Linux - Newbie 1 01-15-2008 09:07 AM
PDFTK, php, & fill_form jb8578 Programming 2 02-12-2007 03:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration