Steganography (extracting)

Hello everyone. I am having some trouble trying to extract a message from an image(tif) and I was wondering if anyone could have some tips or pointers that will help point me in the right direction. So if you could please help me I would really appreciate it. Thank You!

Here is the exact worksheet that I received from my professor.
Steganography refers to the process of hiding information within an obvious form of communication. Digital steganography involves the hiding of data, say a message, inside an image file or an audio file.
You will find two files, parrots.tif and frank.tif, at the ftp site for CS II and in my public directory, slonnegr/public/cs2. The first file is a normal tiff file showing a couple of parrots. In second file, frank.tif, I have hidden a text message containing several hundred characters followed by the character '#' at its end. In hiding the message, I skipped the first 80 bytes of the tiff file, placing the bits of the message in successive bytes of the tiff file starting at the 81st byte.
Here is an example of how digital steganography works. Suppose we have a message with four characters (32 bits).
Message = "Iowa"
Hex = 49 6f 77 61
Binary = 0100 1001 0110 1111 0111 0111 0110 0001
= 010 010 010 110 111 101 110 111 011 000 01
Below you will see eleven pixels from inside the file parrots.tif. Each pixel consists of three bytes for Red, Green, and Blue, in that order. The 32 bits of the message are stored in the right-most (least significant) bit of the first 32 bytes of the eleven pixels. The bytes of the altered file are shown on the right. Those bytes that are actually changed by the coding are given with a bold hex digit.
Original File Altered File
Pixel Red Green Blue Red Green Blue
1 56 3e 39 56 3f 38
2 52 52 39 52 53 38
3 52 52 39 52 53 38
4 56 3e 39 57 3f 38
5 52 52 39 53 53 39
6 52 52 39 53 52 39
7 52 52 39 53 53 38
8 56 3e 39 57 3f 39
9 52 52 39 52 53 39
10 52 52 39 52 52 38
11 56 3e 39 56 3f 39
Your mission is to download the file frank.tif and extract the message.
Turn in listings of your program and the execution of the program. Also submit the program, which will be graded on the correctness and clarity of your code.

Similar Messages

  • Extracting data from an image (Java Steganography)

    Hey all!
    I am writing an application in Java that hides bytes in an images pixel's Least Significant Bits.
    Here is the embeding function (mind you, its at an early stage). As far as I can tell, it works perfectly...
         public BufferedImage LSB_BufferedImageEmbed(BufferedImage image, byte[] data)
              int imgWidth = image.getWidth(null);
              int imgHeight = image.getHeight(null);
              //preformat the data array and return as an array of ints?
              int[] formated_data = FormatDataArray(data);
              int index = 0;
              try
                   for(int i = 0; i < imgHeight; i++)
                        for(int j = 0; j < imgWidth; j++)
                             if(index == formated_data.length)
                                  break;
                             System.out.print("Pixel prior Embed: " + image.getRGB(j, i) + "\n");
                             int current_pixel = image.getRGB(j, i);
                             int current_data = formated_data[index++];
                             //Perform bitwise AND on current pixel value - isolating the Least Significant bits.
                             //NB: Mask is = ff fc fc fc [Alpha Byte] [Red] [Green] [Blue]
                             //1111 1111 - 1111 1100 - 1111 1100 - 1111 1100
                             current_pixel &= 0xfffcfcfc;
                             //x << y is "shift x right by y spaces"
                             //Add bits 5,4 of current data to the bottom of the red channel - xx -- xx xx
                             current_pixel = current_pixel + ((current_data & 0x30) << 12);
                             //Add bits 3,2 of current data to the bottom of the green channel - xx xx -- xx
                             current_pixel = current_pixel + ((current_data & 0x0c) << 6);
                             //Add bits 1,0 of current data to the bottom of the blue channel - xx xx xx --
                             current_pixel = current_pixel + (current_data & 0x03);
                             image.setRGB(j, i, current_pixel);
              catch(Exception e)
                   System.out.println("Problem with LSB!!");
              return image;
    And here's the corresponding extraction method
         public byte[] LSB_ExtractFromBufferedImage(BufferedImage image)
              int imgWidth = image.getWidth(null);
              int imgHeight = image.getHeight(null);
              int index = 0;
              byte[] extracted_bytes;
              byte[] extracted_data = new byte[12];
              try
                   for (int i = 0; i < imgHeight; i++)
                        for (int j = 0; j < imgWidth; j++)
                             if(index == extracted_data.length)
                                  break;
                             System.out.print("Pixel prior Extract: " + image.getRGB(j, i) + "\n");
                             int current_pixel = image.getRGB(j, i);
                             //Isolate the bit pattern needed for the Int to byte[] method...
                             current_pixel &= 0x00030303;
                             extracted_bytes = IntToByteArray(current_pixel);
                             for(int t = 0; t < 4; t++)
                                  extracted_data[index++] = extracted_bytes[t];
              catch(Exception e)
                   System.out.println("Problem with LSB Extraction!!");
              return extracted_data;
    Unfortunately, this doesn't work all that well (by that, I mean not working at all!) It does return the bits alright, but not the ones that were previosuly embedded. Does anyone have any ideas on any aspect of these methods as to why that shouldn't work??
    Any help is greatly appreciated!
    Cougaris

    Are you sure that you interpret your results correctly ?
    Your routines use different data representations and that leads easily to misinterpretation.
    Especially as you only use 6 Bits from an int but take 4 Bytes as result.
    Post some input and output data. i.e. an array of 3 values for formattedData and the 12 resulting bytes. I expect the data to be correct (relative to your code, probably not to your intentions).
    Regards
    SH

  • I need help on these issue (watermarking and steganography)

    Hi guys, my lecturer did assign me a an assignment. She asked to insert the information about the production's company,expired date, and the approval message into a logo (to avoid fraud lisence). She's giving me option whether to use steganography or watermarking. From my reading (i'm such newbie in this field) one of the best way in stegano and watermarking is patchwork algorithm. So I did search on patchwork algorithm.
    The thing that make me so confuse is when I did the searching in google for that patchwork algorithm, the result will be in patchwork algorithm in waterwarking. There's no such details for patchwork algorithm in stegano. There's some in stegano but those just touch on the theory only. So do u guys know resource that I could refer about patchwork algorithm in stegano? I mean very detail experiments or journal or even sourcecode..
    Well, it's fine enough if I have to do it in watermarking. But there's is one issue. When I'm hiding the info, can I extract the info by using a system only (like stegano) without using any hardware device? If it so, is there any sample source code for it? Please help me...Thanks in advance guys!

    What is the connection to LabVIEW?
    LabVIEW Champion . Do more with less code and in less time .

  • Steganography - Rasters

    Hi all,
    Im building a steganography application which decodes a jpeg as a raster using JpegImageDecoder, then splits it up into 8*8 blocks, passes each block through the Discrete Cosine Transform, embeds a secret message in the lsb of the dc coefficient and inverses the process, ultimately saving back as a raster and encoding as a jpeg.
    Problem - when saving back as a raster all my double values are rounded and this loss in precision means that i cannot extract my embedded message!
    Can anyone think of a solution to saving double values (ie. for Red Green Blue) into a raster or bufferedImage?
    Cheers
    Cathal

    Multiple cross post - http://forum.java.sun.com/thread.jspa?threadID=616328&messageID=3431197#3431197

  • How to extract Cleared and Open Items from SAP R/3?

    Hi experts,
    I have a requirement from user to extract cleared and open invoice items from SAP R/3.
    Can someone tell me how to do that?
    Thanks!

    Hi,
    Use the Data source 0FI_AR_4 to Know the status (0FI_DOCSTAT) of payment to be done by customer.
    OR
    Enhance the 2LIS_13_VDITM with VBUP fields which will give the status of Billing.
    With rgds,
    Anil Kumar Sharma .P

  • Extraction and loading of Training and Event Management data (0HR_PE_1)

    hello,
    I've got the following doubt:
    before BI 7.0 release, extractor 0HR_PE_1 extracts event data (eventid, attendee id, calday,...) but if you load straight to cube 0PE_C01, as Calendar year/month needs a reference date (for example, event start date), you'll get total duration of event in hours or days refered to event star date.
    So in a query filtered by month, you get total duration of an event that starts in the filtered month but it couldn`t end until few months later o year later, so you don´t get appropiate information.
    Example:
    Event          calday        Hours
    10004377  20081120   500        but from event_attr event end date is 20090410.
    In a query filtered by 200811 you get total duration time (500 hours when in 200811 event hours have been 20) or if you filter by any month of 2009 you don´t get information of duration of that event.
    I had to create a copy of standar cube (without calday, only Calendar year/month, Calendar year in time dimension) and disaggrate data creating as many entries for an event as months lasts and adjust calculation of ratios duration of event (duration of event in each month/ total duration of event).
    The question is: Is there any improvement or change on business content in BI 7.0 to treat Training and Event Management data? Has anybody had to deal with that?
    Thank you very much.
    IRB

    Hi,
    TEM data is stored in HRP tables.
    You can load the catalog by creating LSMWs for objects Business event group (L), Business event types (D), Locations (F), Organizers (U) as per requirement.
    LSMW for tcode PP01 can be used to create these objects.
    To create Business Events (E) you can create LSMW for PV10/PV11.
    To book attendee create LSMW for tcode PV08 as here you can specify the actual business event ID which reduces ambiguity.
    tcode PV12 to firmly book events
    tcode PV15 to follow up
    Hope this helps.
    Regards,
    Shreyasi.

  • How to Extract Data for a Maintenance View, Structure and Cluster Table

    I want to develop  3 Reports
    1) in First Report
    it consists only two Fields.
    Table name : V_001_B
    Field Name1: BUKRS
    Table name : V_001_B     
    Field Name2: BUTXT
    V_001_B is a Maintenance View
    For this one I don't Find any Datasource
    For this Maintenance View, How to Extract the Data.
    2)
    For the 2nd Report also it consists Two Fields
    Table name : CSKSZ
    Field Name1: KOSTL (cost center)
    Table name : CSKSZ
    Field Name2: KLTXT (Description)
    CSKSZ is a Structure
    For this one I don't Find any Datasource
    For this Structure How to Extract the Data
    3)
    For the 3rd Report
    in this Report all Fields are belonging to a Table BSEG
    BSEG  is a Cluster Table
    For this one also I can't Find any Datasource,
    I find very Few Objects in the Datasource.
    For this One, How to Extract the Data.
    Please provide me step by step procedure.
    Thanks
    Priya

    Hi sachin,
    I don't get your point can you Explain me Briefly.
    I have two Fields for the 1st Report
    BUKRS
    BUTXT
    In the 2nd Report
    KOSTL
    KLTXT
    If I use  0COSTCENTER_TEXT   Data Source
    I will get KOSTL Field only
    what about KLTXT
    Thanks
    Priya

  • Basic extraction  doubts sap SAP R/3 to SAP BI

    IN SBIW which radio button i should select if i am extracting the Table in R/3  with 77 fields into sap BI ?
    1) Transaction  or
    2)Master data attributes
    3)texts data
    please tell me ...
    and after that If i want to  use the table for reporting in SAP BI, To which is the best data target to create in SAP BI?
    a)Infocube
    b)DSO
    and please tell me the steps to do in SAP BI system?
    I am asking all these because i am new to sap BI ?
    please do write me...thank you !!!!!!1

    Hi,
    i suppose you need transaction data. We could be sure if you post the table which you want to extract.
    The infoprovider you need is dependent from the data you need for reporting. Pls. search in SDN or in the help.sap.com for modelling help.
    Regards
    Edited by: Zoltan Both on Aug 20, 2008 1:14 PM
    Edited by: Zoltan Both on Aug 20, 2008 1:16 PM

  • BODS 3.1 : SAP R/3 data extraction -What is the difference in 2 dataflows?

    Hi.
    Can anyone advise as to what is the difference  in using the data extraction flow for extracting Data from SAP R/3 ?
    1)DF1 >> SAPR/3 (R3/Table -query transformation-dat file) >>query transformation >> target
    This ABAP flow generates a ABAP program and a dat file.
    We can also upload this program and run jobs as execute preloaded option on datastore.
    This works fine.
    2) We also can pull the SAP R/3 table directly.
    DF2>>SAPR/3 table (this has a red arrow like in OHD) >> Query transformation >> target
    THIS ALSO Works fine. And we are able to see the data directly into oracle.
    Which can also be scheduled on a job.
    BUT am unable to understand the purpose of using the different types of data extraction flows.
    When to use which type of flow for data extraction.
    Advantage / disadvantage - over the 2 data flows.
    What we are not understanding is that :
    if we can directly pull data from R/3 table directly thro a query transformation into the target table,
    why use the Flow of creating a R/3 data flow,
    and then do a query transformation again
    and then populate the target database?
    There might be some practical reasons for using these 2 different types of flows in doing the data extraction. Which I would like to understand.  Can anyone advise please.
    Many thanks
    indu
    Edited by: Indumathy Narayanan on Aug 22, 2011 3:25 PM

    Hi Jeff.
    Greetings. And many thanks for your response.
    Generally we pull the entire SAP R/3 table thro query transformation into oracle.
    For which we use R/3 data flow and the ABAP program, which we upload on the R/3 system
    so as to be able to use the option of Execute preloaded - and run the jobs.
    Since we do not have any control on our R/3 servers nor we have anyone on ABAP programming,
    we do not do anything at the SAP R/3 level
    I was doing this trial and error testing on our Worflows for our new requirement
    WF 1 : which has some 15 R/3 TABLES.
    For each table we have created a separate Dataflow.
    And finally in between in some dataflows, wherein, the SAP tables which had lot of rows, i decided to pull it directly,
    by-passing the ABAP flow.
    And still the entire work flow and data extraction happens ok.
    In fact i tried creating a new sample data flow and tested.
    Using direct download and - and also execute preloaded.
    I did not see any major difference in time taken for data extraction;
    Because anyhow we pull the entire Table, then choose whatever we want to bring into oracle thro a view for our BO reporting or aggregate and then bring data as a table for Universe consumption.
    Actually, I was looking at other options to avoid this ABAP generation - and the R/3 data flow because we are having problems on our dev and qa environments - giving delimiter errors.  Whereas in production it works fine. Production environment is a old set up of BODS 3.1. QA and Dev are relatively new enviornments of BODS. Which is having this delimiter error.
    I did not understand how to resolve it as per this post : https://cw.sdn.sap.com/cw/ideas/2596
    And trying to resolve this problem, I ended up with the option of trying to pull directly the R/3 table. Without using ABAP workflow.  Just by trial and error of each and every drag and drop option. Because we had to urgently do a POC and deliver the data for the entire e recruiting module of SAP. 
    I dont know whether i could do this direct pulling of data - for the new job which i have created,
    which has 2 workflows with 15 Dataflows in each worflow.
    And and push this job into production.
    And also whether i could by-pass this ABAP flow and do a direct pulling of R/3 data, in all the Dataflows in the future for ANY of our SAP R/3 data extraction requirement.  And this technical understanding is not clear to us as regards the difference between the 2 flows.  And being new to this whole of ETL - I just wanted to know the pros and cons of this particular data extraction. 
    As advised I shall check the schedules for a week, and then we shall move it probably into production.
    Thanks again.
    Kind Regards
    Indu
    Edited by: Indumathy Narayanan on Aug 22, 2011 7:02 PM

  • Open Hub: How-to doc "How to Extract data with Open Hub to a Logical File"

    Hi all,
    We are using open hub to download transaction files from infocubes to application server, and would like to have filename which is dynamic based period and year, i.e. period and year of the transaction data to be downloaded. 
    I understand we could use logical file for this purpose.  However we are not sure how to have the period and year to be dynamically derived in filename.
    I have read in sdn a number of posted messages on a similar topic and many have suggested a 'How-to' paper titled "How to Extract data with Open Hub to a Logical Filename".  However i could not seem to be able to get document from the link given. 
    Just wonder if anyone has the correct or latest link to the document, or would appreciate if you could share the document with all in sdn if you have a copy.
    Many thanks and best regards,
    Victoria

    Hi,
    After creating open hub press F1 in Application server file name text box from the help window there u Click on Maintain 'Client independent file names and file paths'  then u will be taken to the Implementation guide screen > click on Cross client maintanance of file name > create a logical file path by clicking on new entiries > after creating logical file path now go to Logical file name definition there give your Logical file , name , physical file (ur file name followed by month or year what ever is applicable (press f1 for more info)) , data format (ASC) , application area (BW) and logical path (choose from F4 selection which u have created first), now goto Assignment of  physical path to logical path > give syntax group >physical path is the path u gave at logical file name definition.
    however we have created a logical path file name to identify the file by sys date but ur requirement seems to be of dynamic date of tranaction data...may u can achieve this by creating a variable. U can see the help from F1 that would be of much help to u. All the above steps i have explained will help u create a dynamic logical file.
    hope this helps u to some extent.
    Regards

  • F.01 - extract to consolidation on company code level

    Hi everyone
    We're trying to do an extract to consolidation on company code level (1). When popup dialog "Filename for extraction file" appears we can choose between presentation server or application server.
    When choosing presentation server and logical filename ECCS_FILE we get error GC027 (Error opening file c:\temp\EXTRACT_CS_CO.txt).
    Doing so choosing application server however works (whereas path isn't the same).
    We already checked and double-checked settings of logical file name and logical path in transaction FILE.
    Any suggestions what to do or isn't it supposed to work via presentation server?
    Thanks in advance and best regards to all
    Renaud

    I have not seen anything that you have mentioned to enter file path?
    Is this being customised for your Company?
    How did you download this before?

  • Extract Data with OPEN HUB to a Logical Filename

    Hi Experts,
    Can anybody help me in sending the link for How to guide...Extract Data with OPEN HUB to a Logical Filename?
    Thanks in advance.
    BWUser

    Hi,
    check this links...
    http://searchcrm.techtarget.com/generic/0,295582,sid21_gci1224995,00.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e698aa90-0201-0010-7982-b498e02af76b
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1570a990-0201-0010-1280-bcc9c10c99ee
    hope this may help you ..
    Regards,
    shikha

  • InfoSpoke Flat File Extract to Logical Filename

    I'm trying to extract data from an ODS to a flat file. So far, I've found that the InfoSpoke must write to the application server for large data volume. Also, in order for the InfoSpoke to transport properly, I must use logical filenames. I've attempted to implement the custom class and append structure as defined in the SAP document "How To... Extract Data with OPEN HUB to a Customer Defined Logical Filename". I'm getting an error when attempting to import the included transports (custom class code). It appears to be a syntax error. Has anyone encountered this, and, if so, how did you fix it?

    Hello.
    I'm getting a syntax error also.  I did not import the transport, but applied the notes thru the appendix.  When I modified the method "GET_OBJECT_REF_INT" in class CL_RSB_DEST as below, I get a syntax error on the "create object" statement.
        when rsbo_c_desttype_int-file_applsrv.
    *{   REPLACE        &$&$&$&$                                          1
    *\      data: l_r_file_applsrv type ref to cl_rsb_file_applsrv.
          data: l_r_file_applsrv type ref to zcl_rsb_file_logical.
    *}   REPLACE
          create object l_r_file_applsrv
            exporting i_dest    = n_dest
                      i_objvers = i_objvers
    Class CL_RSB_DEST,Method GET_OBJECT_REF_INT
    The obligatory parameter "I_S_VDEST" had no value assigned to it.

  • Index failure for a PDF with Extraction Not Allowed

    Hi,
    We have a few PDFs files protected against Page Extraction.
    Is it possible to pass the password to the TREX Engine, somehow, in order to be able to index these files? We want to keep this protection, because the users should not be able to extract any information, when opening the documents.
    Thanks & Best Regards,
    John

    The Template .dwt file is only used locally by DW itself, there's no reason to upload it to the server unless you intend to share it with someone. You have to upload each individual page that the Template updates, every time you update the template and propagate that change across the child pages.
    It would probably be better to use a server side include. That way, you could update one file then upload it and all of your pages would automatically carry that update...
    SSI for Apache: http://www.javascriptkit.com/howto/ssi.shtml
    PHP's version: http://www.tizag.com/phpT/include.php
    It's especially handy if your site gets to the point where you have more than about 20 pages.

  • Extract an image which is only on opening screen

    A while back I chose an image of my cat to use on the opening screen of my iPhone.
    The cat is now dying and I would love to use that image in a multimedia program.
    But I no longer have the original image.
    Is there somewhere that the image is stored, and can I get to it to extract it?

    It is possible to extract this file without jailbreaking. There is an application called mobilesyncbrowser that lets you extract files from your backup - it's going to cost $20 as the extract photos option is only available in the registered "Plus" version.
    To extract the lock screen picture using this program it's located in Pictures & Other Files > Library and the file name is Lockbackground.jpg

Maybe you are looking for

  • Fifa 14 doesnt start after Updating Windows 8.1. Update is -KB2919355.

    So back in March when i installed this update everything was running smoothly. After installing the update Fifa 14 doesnt even start like after clicking the launcher nothing happens. I reinstalled my program, Direct X and .net Framework but nothing w

  • [Solved]Gnome Development releases on AUR

    Hello Arch users! I have an idea: I want to provide development tree (now it's 3.1) of GNOME in AUR. I have some questions to Arch Developers and TU: First: GNOME is a pack of software that is a depedency of lots of packages. Is it possible to create

  • Adding new item at POD

    Hi all, We have a requirement from business, basically: 1) we receive sales order with item A,B and C (any qty). 2) We deliver them in one delivery note and good issue. 3) We receive a POD wich confirm A, and c item, but item B was really item X (cha

  • Do Business Contect dataflows come in 3.x only?

    Dear BW gurus, Do Business Contect dataflows come in 3.x only? Or does it come in 7.0 also (with Transformations and DTPs)? Thanks

  • Help with HTMLLoader

    Hi all, I'm trying to load an html page inside a HTMLLoader object, but it seems that the page loaded (test.html) can't load a javascript file In my application: var content = new window.runtime.flash.html.HTMLLoader(); content.navigateInSystemBrowse