找回密码
 注册

QQ登录

只需一步,快速开始

查看: 13924|回复: 39

网络尖兵完全破解之XP版

[复制链接]
ellie21201 该用户已被删除
发表于 2006-9-22 23:27:25 | 显示全部楼层 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2006-9-23 00:05:18 | 显示全部楼层

网络尖兵完全破解之XP版

[这个贴子最后由lwlz在 2006/09/23 00:06am 第 1 次编辑]

好贴!大家试一下,现在电信大多用的网络尖兵。谢谢!
TPLink R402M的破解补丁无效,已经试过了。
发表于 2006-9-23 08:49:46 | 显示全部楼层

网络尖兵完全破解之XP版

TPLink R402M的破解补丁无效[br][br]-=-=-=- 以下内容由 钱进2006年09月23日 11:34am 时添加 -=-=-=-
石家庄地区试验结果
发表于 2006-9-23 09:09:48 | 显示全部楼层

网络尖兵完全破解之XP版

有没有可以在2000系统上使用的这个程序。
发表于 2006-9-23 09:40:58 | 显示全部楼层

网络尖兵完全破解之XP版

软件装了后不断的连接: micro123.kmip.net(61.135.179.132): http(80)是什么意思?
另外,我在2个XP上试用,好像不行呢,老大?[br][br]-=-=-=- 以下内容由 发个点心2006年09月23日 09:43am 时添加 -=-=-=-
我的用法是在路由猫拨号后再接TPLINK410,不知道是否有影响?
发表于 2006-9-23 13:03:31 | 显示全部楼层

网络尖兵完全破解之XP版

楼主,这个能不能在2000下使用啊
发表于 2006-9-23 15:43:56 | 显示全部楼层

网络尖兵完全破解之XP版

不能在2000下使用,希望楼主尽快推出2000系统的这个补丁.
发表于 2006-9-23 21:30:26 | 显示全部楼层

网络尖兵完全破解之XP版

效果怎么样,我这里要25号后才开始检测,没发调试.
发表于 2006-9-23 23:23:36 | 显示全部楼层

网络尖兵完全破解之XP版

楼主是高手,我想问下你,你如何能在应用层截取IP包,并能修改IP包头中的数据,我看你是用DELPHI写的,你的驱动好似用了别人的防火墙的驱动,能不能提供原码,让大家一起来完善它,因为单纯修改这两个地方的数据,还有很多不能防止的!我也研究了很长时间了。[br][br]-=-=-=- 以下内容由 hzl886882006年10月05日 01:36pm 时添加 -=-=-=-
楼主不公布源码,我来公布:
/*
  DrvFltIp.C
  Author: your name
  Last Updated: 2001-01-01/0101
  This framework is generated by QuickSYS.
*/
&#35;include <string.h>
&#35;include <stdio.h>
&#35;include <ntddk.h>
&#35;include <ntddndis.h>
&#35;include <pfhook.h>
&#35;include "DrvFltIp.h"
&#35;if DBG
&#35;define dprintf DbgPrint
&#35;else
&#35;define dprintf(x)
&#35;endif
NTSTATUS DrvDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
VOID DrvUnload(IN PDRIVER_OBJECT DriverObject);
NTSTATUS SetFilterFunction(PacketFilterExtensionPtr filterFunction);
NTSTATUS AddFilterToList(IPFilter *pf);
void ClearFilterList(void);
PF_FORWARD_ACTION cbFilterFunction(IN unsigned char *PacketHeader,IN unsigned char *Packet, IN unsigned int PacketLength, IN unsigned int RecvInterfaceIndex, IN unsigned int SendInterfaceIndex, IN unsigned long RecvLinkNextHop, IN unsigned long SendLinkNextHop);
&#35;define NT_DEVICE_NAME L"\\Device\\DrvFltIp"
&#35;define DOS_DEVICE_NAME L"\\DosDevices\\DrvFltIp"

struct filterList *first = NULL;
struct filterList *last = NULL;
/*++
Routine Description:
    Installable driver initialization entry point.
    This entry point is called directly by the I/O system.
Arguments:
    DriverObject - pointer to the driver object
    RegistryPath - pointer to a unicode string representing the path
                   to driver-specific key in the registry
Return Value:
    STATUS_SUCCESS if successful,
    STATUS_UNSUCCESSFUL otherwise
--*/
NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
{
    PDEVICE_OBJECT         deviceObject = NULL;
    NTSTATUS               ntStatus;
    UNICODE_STRING         deviceNameUnicodeString;
    UNICODE_STRING         deviceLinkUnicodeString;
dprintf("DrvFltIp.SYS: entering DriverEntry\n");

//we have to create the device
RtlInitUnicodeString(&deviceNameUnicodeString, NT_DEVICE_NAME);
ntStatus = IoCreateDevice(DriverObject,
0,
&deviceNameUnicodeString,
FILE_DEVICE_DRVFLTIP,
0,
FALSE,
&deviceObject);

    if ( NT_SUCCESS(ntStatus) )
    {
   
        // Create a symbolic link that Win32 apps can specify to gain access
        // to this driver/device
        RtlInitUnicodeString(&deviceLinkUnicodeString, DOS_DEVICE_NAME);
        ntStatus = IoCreateSymbolicLink(&deviceLinkUnicodeString, &deviceNameUnicodeString);
        if ( !NT_SUCCESS(ntStatus) )
        {
            dprintf("DrvFltIp.SYS: IoCreateSymbolicLink failed\n");
        }
        //
        // Create dispatch points for device control, create, close.
        //
        DriverObject->MajorFunction[IRP_MJ_CREATE]         =
        DriverObject->MajorFunction[IRP_MJ_CLOSE]          =
        DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DrvDispatch;
        DriverObject->DriverUnload                         = DrvUnload;
    }
    if ( !NT_SUCCESS(ntStatus) )
    {
        dprintf("Error in initialization. Unloading...");
DrvUnload(DriverObject);
    }
    return ntStatus;
}

/*++
Routine Description:
    Process the IRPs sent to this device.
Arguments:
    DeviceObject - pointer to a device object
    Irp          - pointer to an I/O Request Packet
Return Value:
--*/
NTSTATUS DrvDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
{
    PIO_STACK_LOCATION  irpStack;
    PVOID               ioBuffer;
    ULONG               inputBufferLength;
    ULONG               outputBufferLength;
    ULONG               ioControlCode;
    NTSTATUS            ntStatus;
    Irp->IoStatus.Status      = STATUS_SUCCESS;
    Irp->IoStatus.Information = 0;


    // Get a pointer to the current location in the Irp. This is where
    //     the function codes and parameters are located.
    irpStack = IoGetCurrentIrpStackLocation(Irp);

    // Get the pointer to the input/output buffer and it';s length
    ioBuffer           = Irp->AssociatedIrp.SystemBuffer;
    inputBufferLength  = irpStack->Parameters.DeviceIoControl.InputBufferLength;
    outputBufferLength = irpStack->Parameters.DeviceIoControl.OutputBufferLength;
    switch (irpStack->MajorFunction)
    {
    case IRP_MJ_CREATE:
        dprintf("DrvFltIp.SYS: IRP_MJ_CREATE\n");
        break;
    case IRP_MJ_CLOSE:
        dprintf("DrvFltIp.SYS: IRP_MJ_CLOSE\n");
        break;
    case IRP_MJ_DEVICE_CONTROL:
        dprintf("DrvFltIp.SYS: IRP_MJ_DEVICE_CONTROL\n");
        ioControlCode = irpStack->Parameters.DeviceIoControl.IoControlCode;
        switch (ioControlCode)
        {
// ioctl code to start filtering
case START_IP_HOOK:
{
           SetFilterFunction(cbFilterFunction);
break;
}
// ioctl to stop filtering
case STOP_IP_HOOK:
{
SetFilterFunction(NULL);
            
break;
}
            // ioctl to add a filter rule
case ADD_FILTER:
{
if(inputBufferLength == sizeof(IPFilter))
{
IPFilter *nf;
nf = (IPFilter *)ioBuffer;
AddFilterToList(nf);
}
break;
}
// ioctl to free filter rule list
case CLEAR_FILTER:
{
ClearFilterList();
break;
}
default:
Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
dprintf("DrvFltIp.SYS: unknown IRP_MJ_DEVICE_CONTROL\n");
break;
        }
        break;
    }

    //
    // DON';T get cute and try to use the status field of
    // the irp in the return status.  That IRP IS GONE as
    // soon as you call IoCompleteRequest.
    //
    ntStatus = Irp->IoStatus.Status;
    IoCompleteRequest(Irp, IO_NO_INCREMENT);

    //
    // We never have pending operation so always return the status code.
    //
    return ntStatus;
}
/*++
Routine Description:
    Free all the allocated resources, etc.
Arguments:
    DriverObject - pointer to a driver object
Return Value:

--*/
VOID DrvUnload(IN PDRIVER_OBJECT DriverObject)
{
    UNICODE_STRING         deviceLinkUnicodeString;
dprintf("DrvFltIp.SYS: Unloading\n");
    SetFilterFunction(NULL);
// Free any resources
ClearFilterList();
   
    // Delete the symbolic link
    RtlInitUnicodeString(&deviceLinkUnicodeString, DOS_DEVICE_NAME);
    IoDeleteSymbolicLink(&deviceLinkUnicodeString);
   
// Delete the device object
    IoDeleteDevice(DriverObject->DeviceObject);
}

/*++
Routine Description:
    Get a reference to IpFilterDriver so we will be able to install the filter
Arguments:
    pDeviceObject - pointer to a pointer of device object
    pFileObject   - pointer to a pointer of file object
Return Value:
    STATUS_SUCCESS if successful,
    STATUS_UNSUCCESSFUL otherwise
--*/
NTSTATUS SetFilterFunction(PacketFilterExtensionPtr filterFunction)
{
NTSTATUS status = STATUS_SUCCESS, waitStatus=STATUS_SUCCESS;
UNICODE_STRING filterName;
PDEVICE_OBJECT ipDeviceObject=NULL;
PFILE_OBJECT ipFileObject=NULL;
PF_SET_EXTENSION_HOOK_INFO filterData;
KEVENT event;
IO_STATUS_BLOCK ioStatus;
PIRP irp;
dprintf("Getting pointer to IpFilterDriver\n");
//first of all, we have to get a pointer to IpFilterDriver Device
RtlInitUnicodeString(&filterName, DD_IPFLTRDRVR_DEVICE_NAME);
status = IoGetDeviceObjectPointer(&filterName,STANDARD_RIGHTS_ALL, &ipFileObject, &ipDeviceObject);
if(NT_SUCCESS(status))
{
//initialize the struct with functions parameters
filterData.ExtensionPointer = filterFunction;
//we need initialize the event used later by the IpFilterDriver to signal us
//when it finished its work
KeInitializeEvent(&event, NotificationEvent, FALSE);
//we build the irp needed to establish fitler function
irp = IoBuildDeviceIoControlRequest(IOCTL_PF_SET_EXTENSION_POINTER,
      ipDeviceObject,
(PVOID) &filterData,
sizeof(PF_SET_EXTENSION_HOOK_INFO),
NULL,
0,
FALSE,
&event,
&ioStatus);

if(irp != NULL)
{
// we send the IRP
status = IoCallDriver(ipDeviceObject, irp);
//and finally, we wait for "acknowledge" of IpDriverFilter
if (status == STATUS_PENDING)
{
waitStatus = KeWaitForSingleObject(&event, Executive, KernelMode, FALSE, NULL);
if (waitStatus != STATUS_SUCCESS )
dprintf("Error waiting for IpFilterDriver response.");
}
status = ioStatus.Status;
if(!NT_SUCCESS(status))
dprintf("Error, IO error with ipFilterDriver\n");
}
else
{
//if we cant allocate the space, we return the corresponding code error
status = STATUS_INSUFFICIENT_RESOURCES;
dprintf("Error building IpFilterDriver IRP\n");
}
if(ipFileObject != NULL)
ObDereferenceObject(ipFileObject);
ipFileObject = NULL;
ipDeviceObject = NULL;
}
else
dprintf("Error while getting the pointer\n");
return status;
}


/*++
Routine Description:
    Add a rule to the filter list
Arguments:
      pf - pointer to filter rule

Return Value:
    STATUS_SUCCESS if successful,
    STATUS_INSUFFICIENT_RESOURCES otherwise

--*/
NTSTATUS AddFilterToList(IPFilter *pf)
{
struct filterList *aux=NULL;
// first, we reserve memory (non paged) to the new filter
aux=(struct filterList *) ExAllocatePool(NonPagedPool, sizeof(struct filterList));
if(aux == NULL)
{
dprintf("Problem reserving memory\n");
return STATUS_INSUFFICIENT_RESOURCES;
}
//fill the new structure
aux->ipf.destinationIp = pf->destinationIp;
aux->ipf.sourceIp = pf->sourceIp;
aux->ipf.destinationMask = pf->destinationMask;
aux->ipf.sourceMask = pf->sourceMask;
aux->ipf.destinationPort = pf->destinationPort;
aux->ipf.sourcePort = pf->sourcePort;
aux->ipf.protocol = pf->protocol;
aux->ipf.drop=pf->drop;
//Add the new filter to the filter list
if(first == NULL)
{
first = last = aux;
first->next = NULL;
}
else
{
last->next = aux;
last = aux;
last->next = NULL;
}
dprintf("Rule Added\n\t%x %x\n\t%x %x\n\t%x\n\t%x", aux->ipf.sourceIp
  , aux->ipf.sourceMask
      , aux->ipf.destinationIp
      , aux->ipf.destinationMask
  , aux->ipf.sourcePort
  , aux->ipf.destinationPort);
return STATUS_SUCCESS;
}


/*++
Routine Description:
    Remove the linked list where the rules were saved.
Arguments:

Return Value:

--*/
void ClearFilterList(void)
{
struct filterList *aux = NULL;
//free the linked list
dprintf("Removing the filter List...");
while(first != NULL)
{
aux = first;
first = first->next;
ExFreePool(aux);
dprintf("One Rule removed");
}
first = last = NULL;
dprintf("Removed is complete.");
}
USHORT checksum(USHORT *buffer, int size)
{
unsigned long cksum=0;
while (size > 1)
{
cksum += *buffer++;
size -= sizeof(USHORT);
}
if (size)
{
cksum += *(UCHAR*)buffer;
}
cksum = (cksum >> 16) + (cksum & 0xffff);
cksum += (cksum >>16);
return (USHORT)(~cksum);
}

/*++
Routine Description:
    Filter each packet is received or sended
To see parameters and return you can read it in MSDN
--*/
PF_FORWARD_ACTION cbFilterFunction(IN unsigned char *PacketHeader,IN unsigned char *Packet, IN unsigned int PacketLength, IN unsigned int RecvInterfaceIndex, IN unsigned int SendInterfaceIndex, IN unsigned long RecvLinkNextHop, IN unsigned long SendLinkNextHop)
{
IPPacket *ipp;
TCPHeader *tcph;
UDPHeader *udph;
int countRule=0;
struct filterList *aux = first;
//we "extract" the ip Header
ipp=(IPPacket *)PacketHeader;
    ipp->ipID=1;此处更改包头中的ipid,这是ISP检查的重要地方,你可以将它改为0,此处我将它改为1,实际在包头中的数据为256.你也可以将它改为其它的数据!
ipp->ipTTL=129; //此处更改数据包的生存周期,我将它更改为129了。
    dprintf("Tama駉: %x, %d", PacketLength, RecvInterfaceIndex);
dprintf("Source: %x\nDestination: %x\nProtocol: %d", ipp->ipSource, ipp->ipDestination, ipp->ipProtocol);
//TCP -> protocol = 6
//we accept all packets of established connections
if(ipp->ipProtocol == 6)
{
tcph=(TCPHeader *)Packet;
        dprintf("FLAGS: %x\n", tcph->flags);
//if we havent the bit SYN activate, we pass the packets
if(!(tcph->flags & 0x02))
return PF_FORWARD;
}
//otherwise, we compare the packet with our rules
while(aux != NULL)
{
dprintf("Comparing with Rule %d", countRule);
//if protocol is the same....
if(aux->ipf.protocol == 0 || ipp->ipProtocol == aux->ipf.protocol)
{
//we look in source Address
if(aux->ipf.sourceIp != 0 && (ipp->ipSource & aux->ipf.sourceMask) != aux->ipf.sourceIp)
{
aux=aux->next;
countRule++;
continue;
}
// we look in destination address
if(aux->ipf.destinationIp != 0 && (ipp->ipDestination & aux->ipf.destinationMask) != aux->ipf.destinationIp)
{
aux=aux->next;
countRule++;
continue;
}
//if we have a tcp packet, we look in ports
//tcp, protocol = 6
if(ipp->ipProtocol == 6)
{
if(aux->ipf.sourcePort == 0 || tcph->sourcePort == aux->ipf.sourcePort)
{
if(aux->ipf.destinationPort == 0 || tcph->destinationPort == aux->ipf.destinationPort) //puerto tcp destino
{
//now we decided what to do with the packet
if(aux->ipf.drop)
return  PF_DROP;
else
return PF_FORWARD;
}
}
}
//udp, protocol = 17
else if(ipp->ipProtocol == 17)
{
udph=(UDPHeader *)Packet;
if(aux->ipf.sourcePort == 0 || udph->sourcePort == aux->ipf.sourcePort)
{
if(aux->ipf.destinationPort == 0 || udph->destinationPort == aux->ipf.destinationPort)
{
//now we decided what to do with the packet
if(aux->ipf.drop)
return  PF_DROP;
else
return PF_FORWARD;
}
}
}
else
{
//for other packet we dont look more and ....
//now we decided what to do with the packet
if(aux->ipf.drop)
return  PF_DROP;
else
return PF_FORWARD;
}
}
//compare with the next rule
countRule++;
aux=aux->next;
}
//we accept all not registered
return PF_FORWARD;
    ipp->ipChecksum=0;   
ipp->ipChecksum=checksum((USHORT *)ipp,sizeof(*ipp));//ip包头校检!
}

kodao 该用户已被删除
发表于 2006-9-24 13:27:01 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|宽带技术网 |网站地图 粤公网安备44152102000001号

GMT+8, 2025-5-16 09:35 , Processed in 0.025791 second(s), 6 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表