14 Replies - 379 Views - Last Post: 06 August 2015 - 11:17 AM

#1 stylost  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 6
  • Joined: 06-August 15

Manipulating word document without opening

Posted 06 August 2015 - 08:21 AM

Hey there,

I'm quiet new to programming although I do have some experience in stuff like python, c++ so i do kind of understand the concepts.

Now, what i'm looking for, is some way to manipulate a word document without having to open it.


in this way you could, for example, automatically startup a new program running on the background when the user is opening the word document to manipulate it.
So I'm trying to give the word document some 'extra information' in its 'opening-process'. how should I do this? is there a language that has the specifical commands and ability to put then within the 'opening-proces' of the word document.

So I don't need an full explanation of how to do it (althought i'd like it if you can give it to me) but just a first few hints to start producing the thing i asked for.

thank u anyways!

Is This A Good Question/Topic? 0
  • +

Replies To: Manipulating word document without opening

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 10609
  • View blog
  • Posts: 41,175
  • Joined: 12-June 08

Re: Manipulating word document without opening

Posted 06 August 2015 - 08:25 AM

Quote

So I'm trying to give the word document some 'extra information' in its 'opening-process'.

What sort of extra information?


Quote

automatically startup a new program running on the background when the user is opening the word document

What sort of app? This seems.. shady.
Was This Post Helpful? 0
  • +
  • -

#3 tlhIn`toq  Icon User is offline

  • Freelance developer
  • member icon

Reputation: 6056
  • View blog
  • Posts: 13,330
  • Joined: 02-June 10

Re: Manipulating word document without opening

Posted 06 August 2015 - 08:34 AM

Very shady. Sounds like someone wanting to monitor the data without the user knowing it. Maybe to gain information while at work from client records and so on.

There is no way this can be a legitimate program.
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 4182
  • View blog
  • Posts: 13,336
  • Joined: 05-May 12

Re: Manipulating word document without opening

Posted 06 August 2015 - 09:20 AM

Since Word documents are data files, not executable files, there's nothing that you can do directly in the document itself to get it to execute other code while in the process of opening it. Word documents allow you to embed VBA macros, but those macros are only executed after the document has already been opened. Modern versions of Word will also prompt you whether macros should be executed or not, so there is no way you can do this surreptitiously.

The only way you can do this is to start writing some malware that you embed into the word document data directly. You'll need to try to find vulnerabilities in the way Word reads and processes the data so that Word will accidentally execute your code. Over the years, Word has been hardened from this kind of attack and you'll have to find another vector. Perhaps take advantage of the TrueType font vulnerability disclosed last year and somehow embed that font into the Word document, or find a vulnerability in a virus checker that invariably will read the word data before Word gets a chance to read the data, or find a vulnerability in the various Windows explorer add-ons that will also have a chance to read the data before Word does, or perhaps masquerade as a helpful Word plugin, or not masquerade, but rather do some invasive DLL injection, etc.

All of that described in the second paragraph are all shady, malware tactics. None of them would be what a legitimate program would be doing. (Avast, I'm looking at you and your DLL injection tricks that you do for my own good supposedly.)

What exactly are you trying to do with the Word document that you would need code to be executed?
Was This Post Helpful? 0
  • +
  • -

#5 stylost  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 6
  • Joined: 06-August 15

Re: Manipulating word document without opening

Posted 06 August 2015 - 09:22 AM

To be totally honest with you guys I don't have a real serious purpose allready... I just wan't to know how to do it. This might seem like I want to infect a computer to do harm and stuff but thats not the case at all. I'm just wondering how to do it, before finding out why I want it to do what I want.


But, to think of some none-violent purpose, imagine you want the computer to delete all temporary-internet-files (And some other files in other directories) because it needs as much memory as possible (your having a heavy worddoc with pics and stuff). It's not very efficient to do this everytime you want to work in word, so maybe a little program could ease things up.



So I understand your concerns, actually i'm glad you have them, but believe me you guys, I'm not gonna terror the world or hack the NSA or stuff I'm just trying to become a decent programmer :-)
Was This Post Helpful? 0
  • +
  • -

#6 stylost  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 6
  • Joined: 06-August 15

Re: Manipulating word document without opening

Posted 06 August 2015 - 09:27 AM

View PostSkydiver, on 06 August 2015 - 09:20 AM, said:

The only way you can do this is to start writing some malware that you embed into the word document data directly. You'll need to try to find vulnerabilities in the way Word reads and processes the data so that Word will accidentally execute your code. Over the years, Word has been hardened from this kind of attack and you'll have to find another vector. Perhaps take advantage of the TrueType font vulnerability disclosed last year and somehow embed that font into the Word document, or find a vulnerability in a virus checker that invariably will read the word data before Word gets a chance to read the data, or find a vulnerability in the various Windows explorer add-ons that will also have a chance to read the data before Word does, or perhaps masquerade as a helpful Word plugin, or not masquerade, but rather do some invasive DLL injection, etc.


That's clear, but I think: when you click on the word-logo on your desktop, your giving somehow the command to go to a certain location on your harddisk, and execute the commands which are in there, toghether with displaying the data, which results in you seeing your wordprogram and doc on your screen. Is it really that hard to add an extra line that not only opens the wordcommands and data on your computer, but also that other program you have?
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 10609
  • View blog
  • Posts: 41,175
  • Joined: 12-June 08

Re: Manipulating word document without opening

Posted 06 August 2015 - 09:29 AM

Quote

I'm just wondering how to do it, before finding out why I want it to do what I want.

That makes no sense. You would have an idea on *why* you want to do something to spur looking into *how* you want to do something.

Quote

Is it really that hard to add an extra line that not only opens the wordcommands and data on your computer, but also that other program you have?

Well, yeah... you know, because of malware and viruses using this vector.
Was This Post Helpful? 0
  • +
  • -

#8 tlhIn`toq  Icon User is offline

  • Freelance developer
  • member icon

Reputation: 6056
  • View blog
  • Posts: 13,330
  • Joined: 02-June 10

Re: Manipulating word document without opening

Posted 06 August 2015 - 09:46 AM

View Poststylost, on 06 August 2015 - 10:22 AM, said:

But, to think of some none-violent purpose, imagine you want the computer to delete all temporary-internet-files (And some other files in other directories) because it needs as much memory as possible

Files don't affect memory. They only affect storage space on the drive. You might consider taking a couple intro to computer courses to better understand how they work before you try to write code for them.

Clearing a few temp files won't really do much for you. Its certainly not going to help a computer that is running THAT low on space. There wouldn't be enough space for page files and so on. Spend $50 and buy a 4 terrabyte drive if you need the space.


View Poststylost, on 06 August 2015 - 10:22 AM, said:

So I understand your concerns, actually i'm glad you have them, but believe me you guys, I'm not gonna terror the world or hack the NSA or stuff I'm just trying to become a decent programmer :-)


Then for now, just work on learning your chosen coding language, the syntax and the design pattern concepts. You have about 2 years of learning ahead of you before you should even be thinking about the *why* of anything, let alone designing a program for ANY purpose.
Was This Post Helpful? 0
  • +
  • -

#9 stylost  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 6
  • Joined: 06-August 15

Re: Manipulating word document without opening

Posted 06 August 2015 - 09:56 AM

View PosttlhIn`toq, on 06 August 2015 - 11:46 AM, said:

Then for now, just work on learning your chosen coding language, the syntax and the design pattern concepts. You have about 2 years of learning ahead of you before you should even be thinking about the *why* of anything, let alone designing a program for ANY purpose.

yes, that's what i'm actually trying to do, I wasn't thinking about the why till you guys started asking for it. I'm just wondering about this specifical question and the how-to. Writing a program isn't the issue for me at the moment, I'm able to make as well games as gui-programs with python so that part is fine. Most of all I'm now trying to make stuff some more user-friendly and integrating them with existing programs. I'm talking about word now, but the same algortihm I described will exist for other programs, like autocad, too, then space adds up some quicker.

so maybe I should change my Original question a little to:
" is it able to write a program you startup by clicking on the icon on your desktop, and after that, click some specifical word-files, and by clicking on them (just one click) the program opens the word files, search for all "a"s and change them to "b"s?

This post has been edited by modi123_1: 06 August 2015 - 09:58 AM
Reason for edit:: fixed wrong quote

Was This Post Helpful? 0
  • +
  • -

#10 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 10609
  • View blog
  • Posts: 41,175
  • Joined: 12-June 08

Re: Manipulating word document without opening

Posted 06 August 2015 - 09:59 AM

If that were the case I would then close the topic as it is butting up on the wrong side of the malicious manipulating bright line.
Was This Post Helpful? 0
  • +
  • -

#11 stylost  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 6
  • Joined: 06-August 15

Re: Manipulating word document without opening

Posted 06 August 2015 - 10:21 AM

What if i want the program to copy the 'picture u load into or delete out of the document' also to a certain directorie, so after your done you would have a directory with a the pics inside a specifical document.
Would that be legal?
Was This Post Helpful? 0
  • +
  • -

#12 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 10609
  • View blog
  • Posts: 41,175
  • Joined: 12-June 08

Re: Manipulating word document without opening

Posted 06 August 2015 - 10:25 AM

I am not sure how to parse what you just said.
Was This Post Helpful? 0
  • +
  • -

#13 tlhIn`toq  Icon User is offline

  • Freelance developer
  • member icon

Reputation: 6056
  • View blog
  • Posts: 13,330
  • Joined: 02-June 10

Re: Manipulating word document without opening

Posted 06 August 2015 - 10:33 AM

That REALLY sounds like data theft. And privacy invasion. Think about this happening in a doctor's office.
I see offices that scan your insurance card when you first visit. Would you want something like this running in the background?
Or every private email that includes images of your X-rays or test results?

Even after hearing you say "I don't have a real reason for this... I'm just wondering..." You seem to be pressing the course you are on of finding ways to hack Word documents and pirate the data off to other locations.

I think its time to lodge an alert on this thread.
Was This Post Helpful? 0
  • +
  • -

#14 stylost  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 6
  • Joined: 06-August 15

Re: Manipulating word document without opening

Posted 06 August 2015 - 11:03 AM

View PosttlhIn`toq, on 06 August 2015 - 10:33 AM, said:

That REALLY sounds like data theft. And privacy invasion. Think about this happening in a doctor's office.
I see offices that scan your insurance card when you first visit. Would you want something like this running in the background?
Or every private email that includes images of your X-rays or test results?

Even after hearing you say "I don't have a real reason for this... I'm just wondering..." You seem to be pressing the course you are on of finding ways to hack Word documents and pirate the data off to other locations.

I think its time to lodge an alert on this thread.

whatever you want dude jeez. This is not for commercial issues it's just for personal education but if you fellas think everybody asking a question had bad intentions and want to ruin the world whatever. I don't even want to go into someone elses files just my own files but if that smells like corrupting to you than ban me over here. I came to find out some stuff about programming and all you guys doing is acting like the police, well, send me away then, for you aren't helping me anyways i wouldnt feel sad.

but over here in holland we have a saying: 'zoals de waard is vertrouwt hij zijn gasten' well if that saying is true then you probably hacking the world yourself and u must be filled with cruel intentions cause thats all you guys can thinks of when a simple technical question comes around.

Or maybe you just don't know the way yourself and thats the reason why you only telling me I might be a criminal so you don't have to say you don't know it.

anyways. I'm a little dissapointed right now but no worries I'll try some other forum or something I'm quiet sure it can't be that hard as u guys telling me with 2 years programming ahead and stuff.

i wish you all the best.
good luck.
Was This Post Helpful? -1
  • +
  • -

#15 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 10609
  • View blog
  • Posts: 41,175
  • Joined: 12-June 08

Re: Manipulating word document without opening

Posted 06 August 2015 - 11:17 AM

Okay.. so this thread officially left the tracks, and I'll close it because I am not certain it will recover.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1