injection

EJB / Resource injection references - passing to Pojo's

In JBoss 4.x, @EJB / @Resource annotations can only be used in EJBs. If you use a stateless bean or an MDB as an entry point, you can inject your resources using the annotations. However, if you have Pojo's that perform business logic and need to use these resources, they can not be injected via annotations. I am passing the reference...

Is there any risk of injection in PHP's mail() function?

I am wondering if there is any potential security risk from the following code. I use this on my blog whenever a user submits a comment, it will send me a text message: mail('[email protected]', '', "Comment posted by $name: $comment", "From: [email protected]"); Where $name and $comment are user-entered ...

IPC between python app and injected DLL

Hello stack overflow: Sometimes reader, first time poster. Background: Windows box running XP SP3, soon to be upgraded to Windows Seven (MSDNAA <3) I have an injected DLL which gets cycles by hooking a function that is called thousands of times a second. I would like to communicate/control this DLL via a python app. Basically, the ...

Is there a way to inject code at build time?

I want to inject the following line into the top of every method of my application Trace.WriteLine(this.GetType().Name + "." + "Name of Method"); I'd like to do it at compile time or build time or post-build - basically before it gets into customer's hands. Is this possible? ...

How do I avoid reflection injection attacks in PHP?

I'm writing a class that allows you to bridge HTTP requests with class instances using JSON for data, without any implementation in the class you're bridging to. Basically this is how it works: // This is just an ordinary class. $service = new WeatherService(); $jhi = new JsonHttpInterface($service); $jhi->exec(); The JsonHttpInterfa...

DLL EXE Hybrid C++ Windows

I am currently working with DLL injection and need to have a single hybrid binary that could act as both an executable and a DLL. I thought of maybe writing a DllMain and WinMain function and then compiling it as an executable but I don't know what would happen if I did that. I know that it is posssible to combine a dll and exe by using ...

how wmd avoid the js injection?

How to avoid the wmd editor's js injection? Code like below: < a href="http://www.abc.com"&gt;abc&lt;/a&gt; <br /> <script>alert('hello')</script> ...

Inject javascript into a javascript function

Hi all, I've got a weird question in that I need to inject some javascript into another javascript function. I am using a framework which is locked so I can not change the existing function. What I've got is something like this function doSomething(){ ... } ...* I can manipulate the *(above) however I can not change the doSom...

Is replacing : < and > with &lt; and &gt; enough to prevent XSS injection?

I want to know if entiting the two marks < and > is enough to prevent XSS injections? And if not, why? And what's the best solution? ...

SQLite injection with list of strings

Hello, Could anyone tell me a way to prevent sql injection when building queries for SQLite where the WHERE clause has an "myval IN (string_1, ... , string_n)" condition ? I though about dynamically building the command text with annotations and adding the parameters for those annotations from the string list. Is there an easier way ? ...

How to use Ajax to inject specific PHP function using URL, or other method?

Hey all, I'm moving from the realm of just JS to php and Ajax. I've dabbled some with PHP in the past. I really appreciate how much help stackoverflow has been in helping me with basic questions. let says I have a div called #divName. I use the following JS for Ajax. Some of this is just pseudo code. var request = false; try { ...

Website Link Injection

I have a website that is fairly static. It has some forms on it to send in contact information, mailing list submissions, etc. Perhaps hours/days after an upload to the site I found that the main index page had new code in it that I had not placed there that contained a hidden bunch of links in a invisible div. I have the following code...

how to know load finished event of newly injected html script element in Qt?

Hi all, I would like to know load finished event of newly injected html 'script' element from Qt. After that i want to call one method of that js file . I am working with Qt UI application. From main method i open the web page. In on_webView_loadFinished() slot , i write script injection first and after that invoke one method from the ...

NPAPI plugin inject script

Hi, I'm developing an npapi plugin. I am trying to inject a script into the current webpage of the browser,but am not able to do it. Any hints or suggestions as to how i should proceed with it, would be really helpful. Thanks ...

Can an attacker take advantage of HTML tag injection in request parameters?

Say I have a web application that accepts a parameter called "content". Whatever is present in this parameter will be output as a part of the HTML response. Example JSP code: <%= request.getParameter("content") %> I know this is silly and it should be sanitized and so on, but my question is if an attacker can actually take advantage ...

Merge two exe files into one programmatically

Hi Is there a way to merge two exe files into one, programmatically, so that running it would execute both older exe files together. I found some things on google about injecting code or dll files but is it possible two merge two exe files or to inject exe into exe? Thanks in advance. [EDIT] Thanks everyone. Just for those who said tha...

Tracking HDC from injected process

Hi, I'm facing quite a dilemma. I've injected my DLL into other process as well as hooked few WinAPI calls from there, ExtTextOutW@GDI32, DrawTextExW@GDI32 and AlphaBlend@Msimg32 to be specific. Now, the problem is that when the other application writes something with those two GDI32 functions, i don't know the exact location where it c...

mootools inject disabled element

I can't seem to figure out how to inject a disabled element. Any help will be appreciated. I apologize, as I made several mistakes posting this. First of all, i was applying the attribute to an h3 element (how do you disable that??, you don't). Also, I'm afraid I have tried a : with still no effect. Please forgive my error, and here is ...

Determining XSS Attack Vulnerabilities

Hi all, I am experiencing a relentless XSS attack that I can't seem to prevent. I've got three total input forms on my site - one is for the uploading of images, one for adding comments to a page, and a third that sends an email via php. I am protecting all of them in one way or another, but somehow the vulnerability is still there. My...

Unity performance considerations with container controlled lifetime - Is there any reflection lag with multiple Resolve<T>() calls?

Is there any reflection performance considerations when repeatedly calling container.Resolve<T>() when a resolution has already been established? I'm using it in an MVC controller to resolve my data service, so it will be called on every HTTP request. I'm storing the container instance in Application state, and I'm using container contr...