IS IT POSSIBLE TO SEND TCP PACKET WITH THE SOCKET?

Hello everybody iam programing HIJACK attack with jbuilder8 that consiste to detecte a communication between the client and server (tcp session or tcp connexion) and read all informations from this tcp packet(like N�ACK,N� SEQ..) and finnaly send a tcp packet with false information. I have make this project with C under linux(red hat9) compiled with GCC and i have used raw socket like this:
int creat_socket(char *interface)
int fd;
struct ifreq ifr;
struct sockaddr_ll sll;
if ((fd=socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)))==-1)//creat socket {
     perror("socket");
     return -1;
memset(&ifr, 0, sizeof(struct ifreq));//remplir ifr par des '0'
strcpy(ifr.ifr_name, interface);//copier le nom de l'interface ds ifr_name
if (ioctl(fd, SIOCGIFINDEX, &ifr)==-1)//Retrouve le num�ro d'interface et le place dans ifr_ifindex.
     perror("ioctl");
     return -1;
memset(&sll, 0, sizeof(struct sockaddr_ll));//remplir sll par des '0'
sll.sll_family=PF_PACKET;
sll.sll_ifindex=ifr.ifr_ifindex;
sll.sll_protocol=htons(ETH_P_ALL);
if (bind(fd, (struct sockaddr *)&sll, sizeof(struct sockaddr_ll))==-1)//lie le socket a l'interface
     perror("bind");
     return -1;
if (ioctl(fd, SIOCGIFFLAGS, &ifr)==-1)//Lire les attributs actifs du p�riph�rique
     perror("ioctl");
     return -1;
ifr.ifr_flags|=IFF_PROMISC;//Interface en mode promiscuous
if (ioctl(fd, SIOCSIFFLAGS, &ifr)==-1)////ecrire les attributs actifs du p�riph�rique
     perror("ioctl");
     return -1;
return fd;
PROBLEM : I want to know if it�s possible to make that in java because i had search and i have found just the client and server socket but i want a socket to send tcp Packet? Thank you.

hello i had found the ROCKSAW (http://www.savarese.org/software/rocksaw.html ) and i had used in my program, but when the program arrived in:
socket_send=new RawSocket();
i had this error:
java.lang.UnsupportedClassVersionError: org/savarese/rocksaw/net/RawSocket (Unsupported major.minor version 49.0)
     at java.lang.ClassLoader.defineClass0(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
     at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
     at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
     at hijack.M_HIJACK.tcpsend(M_HIJACK.java:345)
     at hijack.M_HIJACK.injection_actionPerformed(M_HIJACK.java:611)
     at hijack.M_HIJACK_injection_actionAdapter.actionPerformed(M_HIJACK.java:861)
     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
     at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
     at java.awt.Component.processMouseEvent(Component.java:5093)
     at java.awt.Component.processEvent(Component.java:4890)
     at java.awt.Container.processEvent(Container.java:1566)
     at java.awt.Component.dispatchEventImpl(Component.java:3598)
     at java.awt.Container.dispatchEventImpl(Container.java:1623)
     at java.awt.Component.dispatchEvent(Component.java:3439)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
     at java.awt.Container.dispatchEventImpl(Container.java:1609)
     at java.awt.Component.dispatchEvent(Component.java:3439)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
i think that is a problem with a version of JDK (i have jdk1.4) so if you have an idea please help me

Similar Messages

  • I am trying to get Adam 5000 TCP/IP with the 5018, 5056SO modules to talk throu TCP protocol

    Hi,
    I am trying to get Adam 5000 TCP/IP with the 5018, 5056SO modules to talk throu TCP protocol.  Please, is any body that has functional example or advice?
    Thank you
    Irik

    Hi Irik,
    I do not have any experience with these devices. Would it be possible to post their datasheets this will give me a better idea of their functionality. Thanks!
    Steven C

  • Portege R600 - Is it possible to make a call with the SIM?

    Hi,
    I wonder if its possible to use the Wireless connection manager 5 and to make or receive a call?

    Hi,
    I see that nobody answered so i will try to explain what i meant -
    Is it possible to make audio call with the Wireless Manager by the GSM modem module?
    I succeed to send SMS and to connect to HSPA data services but i dont find any reason why i can not connect to the GSM and make a call.
    I have Portege R600 model PPR61E-01C00NG3
    I even succeed to use the GPS that probably installed in the GSM/HSPA modem (wireless manager 5).
    If anyone can explain how and if it possible to make a call please send your reply ... i wnat to use the laptop with BT instead of cell phone ....
    Thanks
    Yan

  • [iPad Mini 1st Gen.] Can't send E-Mails with the normal "Mail" App

    Hi,
    I can't send E-Mails with the normal E-Mail App, it works only with another Mail App, but then I can't send pictures. Maybe my new router is the cause, but it works with my iPhone 5, only with my iPad mini it doesn't work.Well, how I can solve the problem?
    Sorry for my bad English.
    Many Greetings from Germany.

    Hi,
    i can't change the iCloud SMTP Server settings for outgoing E-Mails.It isn't possible to make these "How to" (or how i can call it?) and the moves before i have already done and the issue haven't solved. I think my iPad mini is to old....
    Many greetings,
    xbdsmallwork
    Edit: I have a iCloud Mail Account.

  • Is it possible to send Imessage content on the IPad to the IMAC?

    Is it possible to send Imessage content on the IPad to the IMAC for printing purposes?

    This is a request best asked in the iPad forum.
    But you can press and hold on an iPad Messages bubble.
    You should see (Copy | More...) popup.  Select "More...".
    You will then see circles on the left with the bubble you started with checked.
    Now check all the other messages you want to send to the iMac.
    Once you have all the bubbles you want checked, click on the right turning arrow in the lower right corner of the screen
    You will be able to send the messages to any email address you like.
    Once you get the email on your iMac, you can print it.

  • When I send an email with Mail, I often confuse the account which I'm using. The result is that I send a message with the wrong account! Is there a way to avoid this (for example a reminder before the email is sent)?

    When I send an email with Mail, I often confuse the account which I'm using. The result is that I send a message with the wrong account! Is there a way to avoid this (for example a reminder before the email is sent)?

    Hi, thanks for the answer, I did that already. Unfortunatly this doesn't help me at all, as I often forget to check the menu. For me composing the message is writing the text, the subject, the person to who is addressed and than press "send".
    I often forget to check the "from", and this is a problem because the software select itself one of the accounts.
    Isn't there a way at least to put as a default a blank field instead of one of the accounts? or an account which doesn't work so if I forget to specify the "from" I will be rnotofied that the message can't be sent.
    I guess this could be a rather common problem for many people!
    Thanks
    Sergio

  • Is it possible to play civilization V with the macbook air

    Is it possible to play civilization V with the macbook air

    Civ V system requirements: http://www.aspyr.com/product/game_specs/125
    Check against the tech specs of your MacBook Air http://support.apple.com/specs/#macbookair
    Stefan

  • Is it possible to customize dff's with the help of form personalization?

    Is it possible to customize dff's with the help of form personalization.
    I have added few dffs in a form which users want to be customized according tho their choices.
    Can any one help me in this.

    Pl see MOS Doc 420518.1 - section 10

  • Is it possible to sync your nano with the macbook pro without losing the songs already loaded on the nano?

    Is it possible to sync your nano with the macbook pro without losing the songs already loaded on the nano?

    Not if it's not the original computer you registered it on. 
     

  • I've just subscribed to adobe exportpdf. Can I simply send an email with the converted file?

    I've just subscribed to adobe exportpdf. Can I simply send an email with the converted file?
    THanks in advance
    solromac

    I do not understand your question; what happens when you try?
    [topic moved to ExportPDF forum]

  • Is it possible to use 2 displays with the mac mini

    is it possible to use 2 displays with the mac mini

    I wanted an extended desktop using 2 monitors.
    I am using a Dell Ultrasharp ( has 1 VGA and 1 DVI-D) and a LG W2286 (has 2 HDMI, 1 DVI-D and 1 VGA)
    I ran into a similar issue where initially the mac would not detect the 2 displays and I thought I would share my solution.  I have a Mac Mini 10.8.2 i7 Late 2012.
    I bought a "Cable Matters" brand Mini Display Port | Thunderbolt to DVI Male Cable to have dual monitors.
    I am also using the included in the box  HDMI to DVI-D Adapter from Apple.
    Initial configuration was:
    Mini-Display (Thunderbolt connector) to DVI connected to the LG DVI-D input.
    Apple HDMI to DVI Dongle connected to the Dell DVI-D input.
    What happened was that my desktop was on the LG clear as day but OSX did not see the dell monitor.
    I called apple support and they could not figure out why the mini cant see the dell monitor. I think I discovered that the mac mini could not support 2 dvi monitors.
    I switched the monitor connections.
    The connections that works:
    HDMI out to HDMI in on the LG using a standard HDMI cable.
    Display port | Thunderport to DVI-D on the Dell's DVI-D in.

  • How to set FTP Connection type BINARY with the SOCKET

    hi all,
    manish here.
    could anyone help me in setting the Binary type FTP with the SOCKET.....
    one thing i tried command "TYPE" and argument "I ". but its not accepting and then the Window gets Hang.
    Regards,
    Manish

    X-post:
    http://forum.java.sun.com/thread.jspa?threadID=585104&tstart=0

  • Is there a quad core cpu for my macbook 13in pro early 2011 with the socket P8400

    Is there a quad core cpu for my macbook 13in pro early 2011 with the socket P8400?
    The duel core is not doing the work i need done....

    You cannot upgrade the CPU on a notebook. They are integrated onto the motherboard. Sell the one you have then purchase a new one with the quad-core CPU.

  • Sending TCP packets to many IP addresses after downloading a program

    I constantly monitor UDP and TCP packets sent to IP addresses on my Windows 7 computer. After downloading a free online program to convert media video files, I soon noticed my computer constantly and rapidly sending out packets to more
    than 10 IP addresses (and quite a few were going to China, Russia and Germany). I tried a search on my hard drive for the file that contained those specific IP addresses and found nothing.
    Note: For Viewing Folders, I do not hide operating system files, and I show hidden files, folders and drives.
    Then I  tried searching my windows registry (via REGEDIT) for those IP addresses and found nothing.
    I assumed these IP addresses may have been hidden and included in a .dll file. I could not find an answer on the internet to determine where these hacking IP addresses originated from, so I deleted the program and rebooted.
    The problem still existed, so I had to restore to a previous backup date. The restore fixed the problem.  I am so confused. If I wasn't monitoring my connections I would never have known about this hacking flaw in Windows 7 security. I
    still don't know what type of file(s) were causing this problem. Or what causes my computer to send unsolicited packets to so many IP addresses (to domestic, foreign and hostile locations). 

    Message to members... DO NOT download the software in this area.
    Contains malicious code.
    Thank you FangZhou Chen for your response. I am not exactly sure which of these two programs (listed below) was the culprit for this problem, but I do know that both programs have issues with malicious code. Understand I have used both of these programs
    in the past, but stopped using them because of these issues. The Freeware #1 was my favorite and was user friendly, until the malicious code was added, and may be the real culprit.
    Malicious Freeware #1: Any Video Converter (program name: avc-free.exe)
    This program contains PUP.Optional.OpenCandy - While PUP.Optional.OpenCandy is not technically a virus, this PUP can be extremely annoying and quite difficult to get rid of. It comes loaded with adware, which as anyone who has been infected by adware can tell
    you, can drive you to the brink of insanity with its relentless adverts, plus it will very likely hijack your browser and install a strange and unwanted toolbar on your machine too. Not only do unwanted toolbars get in the way but they can direct you to websites
    that the creators want you to visit and can in general make using your computer a real user-unfriendly experience. PUP.Optional.OpenCandy is also a form of spyware which enables it to be installed deep within your PC’s operating system so that it is harder
    for you to find – and therefore delete.
    Link to site:              any-video-converter.com/products/for_video_free/             
    Link to download program:  any-video-converter.com/download-avc-free.php
    Malicious Freeware #2: SUPER © Media Converter Encoder
    This program is bundled with other software. I don't remember the malicious type or effects.
    Link to site:             erightsoft.com/SUPER.html
    Link to download program:  erightsoft.info/GetFile3.php?SUPERsetup.exe
    Hope this helps. Again thanks! God Bless.
    P.S. - Excellent tools in cleaning up maleware have been to use Malwarebytes, AdwCleaner and  HitmanPro (both recommended by the malwarebytes.org website).

  • Is it possible to send many SMS with one click???

    I have made a php script which generate personal SMS for all of our clients each month.the SMS are generated in .VMG format for PC suite.I have PC suite installed.When I make right click on one of the files with the SMS, there is an -Send sms via Nokia Pc suite- option, but when i chose it it opens the nokia SMS editor and I need to press another button to be able to send the massage.imagine that with 500 SMS
    So my question is if it is possible to skip the last part with pressing send button and just mark all the files and chose send all option.Or if you can give me some otehr suggestion it will be great.

    Use the power zoom feature.
    Select the hand tool and click and hold for a second or two on the
    document (Adobe refers to this as patient user mode).
    Then just use the mouse wheel or the up/down arrow keys to zoom and move
    the red box around to where you want to go to.
    Bob

Maybe you are looking for